Microsoft.Testing.Extensions.Configuration 1.0.0-alpha.26507.8

Prefix Reserved
This is a prerelease version of Microsoft.Testing.Extensions.Configuration.
dotnet add package Microsoft.Testing.Extensions.Configuration --version 1.0.0-alpha.26507.8
                    
NuGet\Install-Package Microsoft.Testing.Extensions.Configuration -Version 1.0.0-alpha.26507.8
                    
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="Microsoft.Testing.Extensions.Configuration" Version="1.0.0-alpha.26507.8" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Microsoft.Testing.Extensions.Configuration" Version="1.0.0-alpha.26507.8" />
                    
Directory.Packages.props
<PackageReference Include="Microsoft.Testing.Extensions.Configuration" />
                    
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 Microsoft.Testing.Extensions.Configuration --version 1.0.0-alpha.26507.8
                    
#r "nuget: Microsoft.Testing.Extensions.Configuration, 1.0.0-alpha.26507.8"
                    
#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 Microsoft.Testing.Extensions.Configuration@1.0.0-alpha.26507.8
                    
#: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=Microsoft.Testing.Extensions.Configuration&version=1.0.0-alpha.26507.8&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Microsoft.Testing.Extensions.Configuration&version=1.0.0-alpha.26507.8&prerelease
                    
Install as a Cake Tool

Microsoft.Testing.Extensions.Configuration

Microsoft.Testing.Extensions.Configuration lets a test application contribute values from an externally owned Microsoft.Extensions.Configuration configuration to Microsoft.Testing.Platform.

The adapter is intentionally one-way: it takes a snapshot of an existing Microsoft.Extensions.Configuration.IConfiguration when the test application is built and exposes those values through MTP's configuration system.

Install the package

dotnet add package Microsoft.Testing.Extensions.Configuration

The example below also uses the standard configuration builder plus JSON and environment-variable providers:

dotnet add package Microsoft.Extensions.Configuration
dotnet add package Microsoft.Extensions.Configuration.Json
dotnet add package Microsoft.Extensions.Configuration.EnvironmentVariables

Usage

using Microsoft.Extensions.Configuration;
using Microsoft.Testing.Extensions;
using Microsoft.Testing.Platform.Builder;

IConfiguration configuration = new ConfigurationBuilder()
    .AddJsonFile("appsettings.json", optional: true)
    .AddEnvironmentVariables()
    .Build();

ITestApplicationBuilder builder = await TestApplication.CreateBuilderAsync(args);
builder.AddMicrosoftExtensionsConfigurationSnapshot(configuration);

using ITestApplication app = await builder.BuildAsync();
return await app.RunAsync();

By default, the snapshot has order 2. MTP command-line values (order 0) and environment variables (order 1) take precedence over it, while it takes precedence over testconfig.json (order 3). Pass a different order when another precedence is required.

Snapshot semantics

  • The configuration is enumerated when ITestApplicationBuilder.BuildAsync builds the MTP configuration pipeline.
  • Changes and reload notifications after that point are not propagated.
  • Hierarchical keys are preserved using the standard : delimiter.
  • The supplied configuration remains owned by the caller and is never disposed by MTP.
  • Null-valued container keys expose their children but do not hide a scalar value from a lower-priority MTP source. A null-valued leaf does hide lower-priority values.
  • Registration is process-local. A live configuration object cannot cross into separately launched test host or controller processes.

The package does not make MTP configuration implement Microsoft.Extensions.Configuration.IConfiguration, does not provide IOptionsMonitor reload behavior, and does not add Microsoft.Extensions dependencies to the MTP core.

Documentation

For comprehensive documentation, see https://aka.ms/testingplatform.

Feedback & contributing

Microsoft.Testing.Platform is an open source project. Provide feedback or report issues in the microsoft/testfx GitHub repository.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos 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 Microsoft.Testing.Extensions.Configuration:

Package Downloads
Microsoft.Testing.Extensions.Hosting

This package composes an application-owned Microsoft.Extensions.Hosting host with Microsoft.Testing.Platform while preserving host ownership and the dependency-free platform core. Microsoft Testing is a set of platform, framework and protocol intended to make it possible to run any test on any target or device.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.0-alpha.26507.8 41 10/7/2026
1.0.0-alpha.26506.1 67 10/6/2026