Microsoft.Extensions.Hosting.Testing
10.3.0-preview.1.26109.11
Prefix Reserved
dotnet add package Microsoft.Extensions.Hosting.Testing --version 10.3.0-preview.1.26109.11
NuGet\Install-Package Microsoft.Extensions.Hosting.Testing -Version 10.3.0-preview.1.26109.11
<PackageReference Include="Microsoft.Extensions.Hosting.Testing" Version="10.3.0-preview.1.26109.11" />
<PackageVersion Include="Microsoft.Extensions.Hosting.Testing" Version="10.3.0-preview.1.26109.11" />
<PackageReference Include="Microsoft.Extensions.Hosting.Testing" />
paket add Microsoft.Extensions.Hosting.Testing --version 10.3.0-preview.1.26109.11
#r "nuget: Microsoft.Extensions.Hosting.Testing, 10.3.0-preview.1.26109.11"
#:package Microsoft.Extensions.Hosting.Testing@10.3.0-preview.1.26109.11
#addin nuget:?package=Microsoft.Extensions.Hosting.Testing&version=10.3.0-preview.1.26109.11&prerelease
#tool nuget:?package=Microsoft.Extensions.Hosting.Testing&version=10.3.0-preview.1.26109.11&prerelease
Microsoft.Extensions.Hosting.Testing
Tools for integration testing of apps built with Microsoft.Extensions.Hosting.
Install the package
From the command-line:
dotnet add package Microsoft.Extensions.Hosting.Testing
Or directly in the C# project file:
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Hosting.Testing" Version="[CURRENTVERSION]" />
</ItemGroup>
Usage Example
FakeHost
FakeHost enables creating an application host pre-configured for a unit test environment.
The host can be created using the following APIs:
public static IHostBuilder CreateBuilder()
public static IHostBuilder CreateBuilder(Action<FakeHostOptions> configure)
public static IHostBuilder CreateBuilder(FakeHostOptions options)
For example:
using var host = await FakeHost.CreateBuilder(options => { });
.ConfigureServices(x =>
{
// ...
})
.StartAsync();
FakeHostingExtensions
FakeHostingExtensions is a collection of IHost and IHostBuilder extension methods for use within a unit test environment. These help collect logs as well as augment the host and app configurations.
Feedback & Contributing
For any feedback or contributions, please visit us in our GitHub repo.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | 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 is compatible. 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 Framework | net462 is compatible. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
-
.NETFramework 4.6.2
- Microsoft.Bcl.TimeProvider (>= 8.0.1)
- Microsoft.Extensions.Compliance.Testing (>= 10.3.0)
- Microsoft.Extensions.Diagnostics.Testing (>= 10.3.0)
- Microsoft.Extensions.Hosting (>= 8.0.1)
-
net10.0
- Microsoft.Bcl.TimeProvider (>= 10.0.3)
- Microsoft.Extensions.Compliance.Testing (>= 10.3.0)
- Microsoft.Extensions.Diagnostics.Testing (>= 10.3.0)
- Microsoft.Extensions.Hosting (>= 10.0.3)
-
net8.0
- Microsoft.Bcl.TimeProvider (>= 8.0.1)
- Microsoft.Extensions.Compliance.Testing (>= 10.3.0)
- Microsoft.Extensions.Diagnostics.Testing (>= 10.3.0)
- Microsoft.Extensions.Hosting (>= 8.0.1)
-
net9.0
- Microsoft.Bcl.TimeProvider (>= 9.0.13)
- Microsoft.Extensions.Compliance.Testing (>= 10.3.0)
- Microsoft.Extensions.Diagnostics.Testing (>= 10.3.0)
- Microsoft.Extensions.Hosting (>= 9.0.13)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 10.3.0-preview.1.26109.11 | 77 | 2/10/2026 |
| 10.2.0-preview.1.26063.2 | 922 | 1/13/2026 |
| 10.1.0-preview.1.25608.1 | 1,478 | 12/9/2025 |
| 10.0.0-preview.1.25559.3 | 712 | 11/11/2025 |
| 9.10.0-preview.1.25513.3 | 1,841 | 10/14/2025 |
| 9.9.0-preview.1.25458.4 | 1,219 | 9/9/2025 |
| 9.8.0-preview.1.25412.6 | 471 | 8/12/2025 |
| 9.7.0-preview.1.25356.2 | 498 | 7/8/2025 |
| 9.6.0-preview.1.25310.2 | 505 | 6/10/2025 |
| 9.5.0-preview.1.25262.9 | 582 | 5/13/2025 |
| 9.4.0-preview.1.25207.5 | 556 | 4/8/2025 |
| 9.3.0-preview.1.25161.3 | 294 | 3/11/2025 |
| 9.2.0-preview.1.25105.6 | 212 | 2/11/2025 |
| 9.1.0-preview.1.25064.3 | 7,321 | 1/14/2025 |
| 9.0.0-preview.9.24556.5 | 267 | 11/12/2024 |
| 9.0.0-preview.9.24507.7 | 201 | 10/8/2024 |
| 9.0.0-preview.8.24460.1 | 163 | 9/10/2024 |
| 8.10.0-rtm.24502.7 | 2,462 | 10/8/2024 |
| 8.9.1-rtm.24456.4 | 109 | 9/6/2024 |
| 8.9.0-rtm.24454.2 | 99 | 9/5/2024 |