.NET

Investigate .NET and .NET MAUI app behavior with session evidence, runtime diagnostics, and tools for inspecting live app state.

See what the user did, what appeared on screen, and what the app reported in the same session. The .NET SDK gives developers and agents evidence and inspection tools to investigate UI issues, failures, and performance.

It supports .NET MAUI and native .NET Android, iOS, and Mac Catalyst apps. Start with the all-in-one package for the app type; it includes the runtime, pairing, capture, and standard remote tools including Clipboard. Purchase diagnostics are part of core and remain opt-in.

Open your app repository in a coding agent and send this prompt:

Copyable prompt:

Use https://www.ansight.ai/skills/dotnet/ansight-install-dotnet.md to install Ansight in this .NET or .NET MAUI app. Keep it in a development build, verify a connected session, and show me the changes.

The setup guide has the manual steps.

Quickstart

.NET MAUI

Install the MAUI package:

dotnet add package Ansight.Maui

Initialize it in MauiProgram.cs before builder.Build():

#if DEBUG
using Ansight.Maui;
#endif

public static MauiApp CreateMauiApp()
{
    var builder = MauiApp.CreateBuilder();
    builder.UseMauiApp<App>();

#if DEBUG
    builder.UseAnsight<App>();
#endif

    return builder.Build();
}

Native .NET

For a non-MAUI Android, iOS, or Mac Catalyst app, install the base all-in-one package:

dotnet add package Ansight

Initialize once from the platform startup location: Android Application.OnCreate() after base.OnCreate(), or iOS and Mac Catalyst AppDelegate.FinishedLaunching(...).

#if DEBUG
using Ansight;

var options = Options.CreateBuilder()
    .WithAnsightSdk()
    .Build();

Runtime.InitializeAndActivate(options);
#endif

Use the app’s explicit internal-build symbol instead of DEBUG when that is the approved Ansight configuration. The all-in-one setup applies developer defaults, connects simulators and emulators to the local host automatically, and registers the standard tool suites.

Important: Screen capture will result in an FPS drop while frames are captured, encoded, and transported. Disable session JPEG capture for trend-focused runs unless visual evidence is required.

For the complete guarded startup, stable automation-id example, and CLI verification flow, use .NET and .NET MAUI Setup.

Use .NET Packages to compare Ansight, Ansight.Maui, Ansight.Core, optional workflow packages, and individual tool packages.

Common Next Steps

  • Use .NET Security before enabling all-in-one packages or remote tools.
  • Use Enrollment for automatic host-local registration and one-time physical-device QR setup.
  • Use Configuration to tune sampling, capture, and pairing behavior.
  • Use JPEG Screenshots to record periodic screenshots for session replay or capture a VisualTree screenshot on demand.
  • Use Crash Capture to configure native crash recovery, retention, host handoff, and offline attachment.
  • Use Network Capture to capture sanitized HttpClient and Apple URL Loading System traffic.
  • Use Connectivity Capture to record OS connection state, transport changes, and supported quality estimates.
  • See Native Offline Capture for disconnected recording and host transfer across mobile SDKs, implemented after SDK 1.8.0.
  • Use .NET Motion Capture to forward shakes and accelerometer samples from app-owned handlers.
  • Use Clipboard Tools to inspect or change the connected app device clipboard.
  • Use Purchase Diagnostics to validate StoreKit or Google Play evidence on simulators and emulators.
  • Use Trends Telemetry to capture FPS, memory, battery, open-file-handle, and Android JNI-reference metrics.
  • Use Touch Input to capture gestures in session replay.
  • Use Screen Views to record page and screen navigation events.
  • Use Capturing Logs to capture runtime logs and receive third-party logs into Ansight.
  • Use App Lifecycle to track foreground and background transitions.
  • Use Artifacts to expose app-owned diagnostic exports as discoverable files.
  • Use Annotated Feedback for Debug-only in-app feedback bundles.
  • Use Offline Capture to retain, export, encrypt, or upload evidence without a live host connection.
  • Use .NET Startup Profiling (Beta) to prepare Android and iOS artifacts for the experimental CLI profiling workflow.
  • Use Tools for the remote tool suites and custom app-defined tools.