Core Framework v3 3.2.1 2025 November 28
Today, we're shipping two new releases:
- xUnit.net Core Framework v3
3.2.1 - xUnit.net Analyzers
1.26.0(release notes)
It's been 4 weeks since the release of 3.2.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.2.0 to 3.2.1.
Core Framework
BUG: We fixed an issue where upgrading from 3.1.0 to 3.2.0 might've caused compilation errors due to a stale cached auto-generated entrypoint. xunit/xunit#3435
BUG: We fixed an issue where unhandled exceptions on background threads could cause the test process to terminate abruptly, which could cause third party runners (like VSTest) to loop forever waiting for the crashed test process. xunit/xunit#3447
BUG: We fixed an issue where worker threads that tests created which were marked as foreground threads could prevent the test process from terminating. Now, during shutdown, we will wait approximately 10 seconds for any outstanding foreground threads to finish their work before forcefully shutting down the test process. Ideally, test authors should always mark their worker threads a background threads to prevent this problem (and/or ensure that any threads complete work before the required test(s) complete).
Note that whether this is considered a failure by the test runner depends on the runner, because in order to propagate this failure to some runners, we will need to make breaking changes to the framework. These changes should come in a later major version update. xunit/xunit#3452
Assertion Library
We have updated the output from
Assert.Equalwith strings to attempt to align the output so that the mismatch positions will be vertically aligned.For example, given the following assertion:
Assert.Equal( "012345678901234567890123456789012345678901234567890123456789", "01234567890123456789012345678901234567890123456789" );The old output would be:
Assert.Equal() Failure: Strings differ โ (pos 50) Expected: ยทยทยท"01234567890123456789012345678901234567890123456789" Actual: "01234567890123456789012345678901234567890123456789"And the new output is:
Assert.Equal() Failure: Strings differ โ (pos 50) Expected: ยทยทยท"01234567890123456789012345678901234567890123456789" Actual: ยทยทยท"0123456789012345678901234567890123456789"If you identify other scenarios where you believe we could do better alignment of strings in this output (or this change breaks a previously useful comparison output), please feel free to open an issue for us to validate and fix. xunit/xunit#3445
BUG: We have fixed a potential exception when inspecting
Exception.Message. While the contract forException.Messagesays it must return a non-nullstringvalue, there are exception implementations in the wild that violate this contract, and it was causingNullReferenceExceptionto be thrown in some situations. xunit/xunit#3448
Runners
- BUG: We fixed an issue with the TRX report wherein an incorrect value was being generated in the XML. xunit/xunit#3442