Core Framework v3 4.0.2 2026 October 9
Today, we're shipping three new releases:
- xUnit.net Core Framework v3
4.0.2 - xUnit.net Analyzers
2.2.0(release notes) - xUnit.net Visual Studio adapter
4.0.1(release notes)
It's been 4 weeks since the release of 4.0.1.
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 4.0.1 to 4.0.2.
Core Framework
BUG: We fixed issues related to the new parallelization system that was sometimes causing tests marked as non-parallel to run as parallel, as well as causing parallel tests scheduled after sequential tests to run sequentially instead of reverting back to parallelism. xunit/xunit#3629 xunit/xunit#3630
BUG: We fixed an issue where
ITestOutputHelperwould sometimes incorrectly escape ANSI sequences that should have been left unescaped. xunit/xunit#3636BUG: We fixed an issue with
DataAttribute,InlineDataAttribute, andITheoryDataRowthat were causing them not to honorSkipType,SkipWhen, and/orSkipUnless. xunit/xunit#3642BUG: We fixed an issue where overloaded test methods were mistakenly reporting a
AmbiguousMatchExceptionrather than correctly reporting the error that overloaded test methods are not supported. Note that the error is reported at run time in reflection-mode; Native AOT-mode does not report an error (does not try to run the test method at all), and depends on the user not disabling xUnit1024 to raise a build time error. xunit/xunit#3645We have updated the XML (Intellisense) documentation for
IAsyncLifetimeto document the fact that classes which throw inInitializeAsync()will not have theirDisposeAsync()called, since we consider this to be the philosophical equivalent to an async constructor.
Runners
BUG: We fixed an issue where using a small multiplier for maximum threads could cause the multiplication to end up as
0, causing unlimited threads. This has been fixed to ensure the multiplier will always result in at least one thread, so there is always thread limiting when using a multiplier. xunit/xunit#3628BUG: We fixed an issue where ANSI codes in test output was causing XML-based reports to either be broken or missing. xunit/xunit#3634
BUG: We fixed an issue newline handling for TRX reports was incorrectly handled on non-Windows OSes. xunit/xunit#3634
Console Runner
- BUG: We fixed an issue with the app domain exception handler and Ctrl+C handler not being correctly unregistered on cleanup. This could cause a system finalizer to throw exceptions. xunit/xunit#3647
Native AOT
BUG: Fixed an issue with Native AOT generation where string constants with non-printable characters could cause compilation issues. xunit/xunit#3625
BUG: Fixed an issue where source generation would fail to include inherited test methods. xunit/xunit#3627
Microsoft Testing Platform
For users who are using
testconfig.jsonto configure xUnit.net, we have added a JSON schema! This is parallel to the one we publish forxunit.runner.json. The schema includes links to the Microsoft documentation for the sections that are generic to MTP. We've updated the documentation fortestconfig.jsonand added a new doc page for the schema.The Microsoft Testing Platform v2 packages have been updated to version 2.5.1.