Xunit.DependencyInjection 8.8.1

Use Microsoft.Extensions.DependencyInjection to inject xunit testclass. If you want write Microsoft.Extensions.Logging to ITestOutputHelper, please install Xunit.DependencyInjection.Logging Release notes: 8.8: Added support `BuildHost` method in startup. 8.7: Allow missing default startup in some case. 8.6: Support any awaitable type of async test method. 8.5: Change analyzer category. 8.4: Fix #63: allow modify default service from DI container. 8.3: Add ActivitySource(name: Xunit.DependencyInjection) and ValueTask/ValueTask<> support. 8.2: Fix #60: support IAsyncDisposable. 8.1: Startup allow static method or class (like Asp.Net Core startup). 8.0: New feature: Support multiple startup. 7.7: Add [MethodData], like [MemberData], support injection. 7.6: Fix #48, each TestRunner should have a different scope. 7.5: Add XunitTestCaseRunnerAdapter, It will be support more XunitTestCase type. 7.4: Always set applicationName, unwarp TargetInvocationException. 7.3: Fix #41, activate ITestOutputHelperAccessor on tests without a constructor. 7.2: Add Startup analyzer. 7.1: Fix can't run test case when host.StartAsync() throw exception. 7.0: Add fixture injection and refactor DependencyInjectionTestFramework, you don't have to declare the [assembly: TestFrameworkAttribute] on normal case.

No packages depend on Xunit.DependencyInjection.

Use Microsoft.Extensions.DependencyInjection to inject xunit testclass. If you want write Microsoft.Extensions.Logging to ITestOutputHelper, please install Xunit.DependencyInjection.Logging Release notes: 8.8: Added support BuildHost method in startup. 8.7: Allow missing default startup in some case. 8.6: Support any awaitable type of async test method. 8.5: Change analyzer category. 8.4: Fix #63: allow modify default service from DI container. 8.3: Add ActivitySource(name: Xunit.DependencyInjection) and ValueTask/ValueTask<> support. 8.2: Fix #60: support IAsyncDisposable. 8.1: Startup allow static method or class (like Asp.Net Core startup). 8.0: New feature: Support multiple startup. 7.7: Add [MethodData], like [MemberData], support injection. 7.6: Fix #48, each TestRunner should have a different scope. 7.5: Add XunitTestCaseRunnerAdapter, It will be support more XunitTestCase type. 7.4: Always set applicationName, unwarp TargetInvocationException. 7.3: Fix #41, activate ITestOutputHelperAccessor on tests without a constructor. 7.2: Add Startup analyzer. 7.1: Fix can't run test case when host.StartAsync() throw exception. 7.0: Add fixture injection and refactor DependencyInjectionTestFramework, you don't have to declare the [assembly: TestFrameworkAttribute] on normal case.

Version Downloads Last updated
11.1.1 2 01/22/2026
11.1.0 2 12/15/2025
11.0.0 3 10/28/2025
10.8.0 3 10/28/2025
10.7.0 4 09/16/2025
10.6.0 5 08/09/2025
10.5.0 5 08/09/2025
10.4.2 5 08/09/2025
10.4.1 5 08/09/2025
10.4.0 5 08/09/2025
10.3.0 5 08/09/2025
10.2.1 5 08/09/2025
10.2.0 5 08/09/2025
10.1.1 5 08/09/2025
10.1.0 6 01/25/2025
10.0.0 5 08/09/2025
9.9.1 747 05/12/2025
9.9.0 16 04/25/2025
9.8.0 16 01/25/2025
9.7.1 10 01/04/2025
9.7.0 1 11/22/2024
9.6.0 6 08/06/2025
9.5.0 21 10/28/2024
9.4.0 6 08/06/2025
9.3.1 6 08/06/2025
9.3.0 6 08/06/2025
9.2.1 6 08/06/2025
9.1.0 6 08/06/2025
9.0.1 6 08/06/2025
8.9.1 6 08/06/2025
8.9.0 8 10/16/2024
8.8.2 6 08/06/2025
8.8.1 6 08/06/2025
8.7.2 6 08/06/2025
8.7.1 6 08/06/2025
8.7.0 5 08/06/2025
8.6.1 6 07/29/2025
8.6.0 6 08/06/2025
8.5.0 295 01/01/2024
8.4.1 6 08/06/2025
8.4.0 6 08/06/2025
8.3.0 6 08/06/2025
8.2.0 6 08/06/2025
8.1.0 6 08/06/2025
8.0.0 6 08/06/2025
7.7.0 6 08/06/2025
7.6.0 6 08/06/2025
7.5.1 6 08/06/2025
7.4.0 6 08/06/2025
7.3.0 6 08/06/2025
7.2.0 6 08/06/2025
7.1.0 6 08/06/2025