Core Framework v3 3.2.0 2025 November 2
Today, we're shipping two new releases:
- xUnit.net Core Framework v3
3.2.0 - xUnit.net Analyzers
1.25.0(release notes)
It's been 5 weeks since the release of 3.1.0.
As always, we'd like to thank all the users who contributed to the success of xUnit.net through usage, feedback, and code. 🎉
Release Notes
These release notes are a list of changes from 3.1.0 to 3.2.0.
Core Framework
- We have added the ability to intercept and replace test class creation. The anticipated usage of this will be for teams which want to use dependency injection to resolve constructor arguments which otherwise could not be provided by the test framework. For more information on using this interception point, please read the Custom Test Class Construction documentation page. xunit/xunit#3384
Assertion Library
- We have updated
Assert.ThrowsandRecord.Exceptionso that they will propagate skip exceptions (that is, any exception which is thrown whose message begins with$XunitDynamicSkip$). This allows dynamic skips to occur inside the lambda expressions for these two assertion methods, in addition to throws thrown directly from the test method itself. xunit/xunit#3412
Runner Utility
- BUG: We have fixed an issue where
Xunit.SimpleRunner.AssemblyRunnercould hang indefinitely if the developer did not subscribe to theOnExecutionCompleteoptions event. xunit/xunit#3431
Microsoft Testing Platform
This build includes updated Microsoft Testing Platform (MTP) support, in three forms:
- Microsoft Testing Platform v1 support (default)
- Microsoft Testing Platform v2 support
- Microsoft Testing Platform support disabled
There are three new top-level NuGet packages for this:
xunit.v3.mtp-v1xunit.v3.mtp-v2xunit.v3.mtp-off
The primary top-level package (
xunit.v3) currently just includesxunit.v3.mtp-v1, making MTP v1 the default. If you want to use MTP v2 (or disable MTP), you can swap out yourxunit.v3package reference for the MTP-specific package of your choice. (You may also swap outxunit.v3forxunit.v3.mtp-v1to ensure you continue to use MTP v1 even if we choose to change the default to MTP v2.)The
xunit.v3.corepackage (which is where MTP support is wired up) has undergone the same treatment:xunit.v3.core.mtp-v1xunit.v3.core.mtp-v2xunit.v3.core.mtp-off
The primary core package (
xunit.v3.core) currently just includesxunit.v3.core.mtp-v1. If you want to use MTP v2 (or disable MTP), you can swap out yourxunit.v3.corepackage reference for the MTP-specific package of your choice. (You may also swap outxunit.v3.coreforxunit.v3.core.mtp-v1to ensure you continue to use MTP v1 even if we choose to change the default to MTP v2.)We opted to leave MTP v1 as the default for now, for two reasons:
- For better backward compatibility
- Upgrading to MTP v2 with .NET 10 SDK disables support for VSTest, which can complicate upgrade scenarios. It is recommended that you upgrade completely away from VSTest to MTP before attempting to upgrade to MTP v2 and .NET 10 SDK due to this limitation.
At this point in time, we do not have a timeframe for when support for MTP v1 will be discontinued, as Microsoft has not announced any timeframe for the retirement of support for MTP v1.
MTP v1 support is using MTP version 1.9.0.
MTP v2 support is using MTP version 2.0.1.This release includes a reference to
Microsoft.Testing.Extensions.Telemetry, which collects some usage information for Microsoft. You can disable this metric collection by setting an environment variable namedTESTINGPLATFORM_TELEMETRY_OPTOUTto1. For more information about the information being collected, see Microsoft.Testing.Platform telemetry.