Table of Contents

Analyzers 1.21.0 2025 April 5

Today, we're shipping two new releases:

  • xUnit.net Core Framework v3 2.0.1 (release notes)
  • xUnit.net Analyzers 1.21.1

It's been 5 weeks since the release of 1.20.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 comprehensive list of changes from 1.20.0 to 1.21.0.

Assertion Analyzers

  • BUG: The fixer for xUnit2017 would always pass the comparer argument to the converted Assert.Contains or Assert.DoesNotContain call, even if the user passed null to the comparer. While null is a valid value for Linq Contains, it is not legal for the assertions, so the fixer will now strip the null during conversion. Note: this only affects users who pass literal null to the Contains call. Passing a variable will retain the variable, and the compiler or runtime will resolve null issues. xunit/xunit#3244