Ansight.Pairing 0.1.0-preview.19

This is a prerelease version of Ansight.Pairing.
dotnet add package Ansight.Pairing --version 0.1.0-preview.19
                    
NuGet\Install-Package Ansight.Pairing -Version 0.1.0-preview.19
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Ansight.Pairing" Version="0.1.0-preview.19" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Ansight.Pairing" Version="0.1.0-preview.19" />
                    
Directory.Packages.props
<PackageReference Include="Ansight.Pairing" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Ansight.Pairing --version 0.1.0-preview.19
                    
#r "nuget: Ansight.Pairing, 0.1.0-preview.19"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Ansight.Pairing@0.1.0-preview.19
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Ansight.Pairing&version=0.1.0-preview.19&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Ansight.Pairing&version=0.1.0-preview.19&prerelease
                    
Install as a Cake Tool

Ansight.Pairing

Ansight.Pairing adds package-owned native pairing acquisition to Ansight.Core.

It provides:

  • native QR scanning for HostConnectionRequest.QrCode(...)
  • Android scanner acquisition via the current Activity and native Apple modal presentation
  • a default IHostConnectionConfigReader wired into the existing runtime-owned host connection flow

Developer pairing is generated by Ansight.Core. Enable AnsightDeveloperPairingEnabled in the app project, then configure WithBundledHostConnection(...); Ansight.Pairing only adds the native QR acquisition path used by explicit overrides.

The Ansight and Ansight.Maui all-in-one packages include this package where supported.

License

The Ansight SDK is source-available software under the Ansight SDK Source-Available License. It is not open-source software. Production use is licensed only for use with Ansight Services.

Usage

using Ansight;
#if ANDROID
using Microsoft.Maui.ApplicationModel;
#endif

var optionsBuilder = Options.CreateBuilder()
    .WithBundledHostConnection(typeof(AppBootstrap).Assembly);

#if ANDROID
optionsBuilder = optionsBuilder.WithPlatformPairing(() => Platform.CurrentActivity);
#else
optionsBuilder = optionsBuilder.WithPlatformPairing();
#endif

var options = optionsBuilder.Build();

Runtime.InitializeAndActivate(options);

On Android, Ansight.Pairing requires the app to provide the current Activity so the package can launch the native scanner UI.

Once enabled, the app can keep using the existing host connection requests:

await Runtime.HostConnection.ConnectAsync(HostConnectionRequest.Auto());
await Runtime.HostConnection.ConnectAsync(HostConnectionRequest.QrCode());
await Runtime.HostConnection.ConnectAsync(HostConnectionRequest.PayloadText(payload));

Auto() still follows the normal Ansight default order: embedded developer pairing, remembered connection profiles, saved config, then plain bundled config. Remembered profiles are created after successful host sessions, keyed by the Wi-Fi network name reported by the host, and store the latest host/LAN address and discovery metadata for that network. The SDK cycles each valid profile newest-first during automatic reconnect attempts. Profiles expire after 14 days by default, and a successful reconnect refreshes the matching Wi-Fi profile. Explicit QR and payload requests always override the current connection attempt and update the remembered profile after a successful connection.

Configure profile retention through the core options builder:

var options = Options.CreateBuilder()
    .WithHostConnectionProfileRetention(TimeSpan.FromDays(30))
    .Build();
Product Compatible and additional computed target framework versions.
.NET net9.0-android35.0 is compatible.  net9.0-ios18.0 is compatible.  net9.0-maccatalyst18.0 is compatible.  net10.0-android was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Ansight.Pairing:

Package Downloads
Ansight

All-in-one Ansight SDK package for .NET apps, including core runtime, pairing, and remote tools.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.1.0-preview.19 34 5/8/2026
0.1.0-preview.18 37 5/8/2026
0.1.0-preview.17 32 5/8/2026
0.1.0-preview.16 37 5/6/2026
0.1.0-preview.15 35 5/5/2026
0.1.0-preview.14 46 5/5/2026
0.1.0-preview.13 31 5/5/2026
0.1.0-pre9 52 5/3/2026
0.1.0-pre8 43 5/3/2026
0.1.0-pre7 45 4/30/2026
0.1.0-pre6 41 4/30/2026
0.1.0-pre5 42 4/30/2026
0.1.0-pre4 52 4/27/2026
0.1.0-pre3 56 4/21/2026
0.1.0-pre12 43 5/4/2026
0.1.0-pre11 51 5/4/2026
0.1.0-pre10 39 5/3/2026