.NET

Add Ansight to a .NET or .NET MAUI development build and initialize it from app startup.

The .NET SDK 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.

Quickstart

.NET MAUI

Install the MAUI package:

dotnet add package Ansight.Maui --prerelease

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 --prerelease

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 choose between periodic session capture and on-demand VisualTree screenshots.
  • Use Crash Capture to configure native crash recovery, retention, host handoff, and offline attachment.
  • 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 Tools for the remote tool suites and custom app-defined tools.