Release Notes for v3 1.0.0 [2024 December 16]

.NET Foundation logo

Today we’re shipping the first release version of xUnit.net v3!

This includes three new releases:

We have shipped several prerelease versions over the last 6 months, and accumulated a good amount of documentation for both users who are migrating from Core Framework v2 as well as users who are new to xUnit.net starting with Core Framework v3. This includes:

For existing v2 users, the migration guide will help you understand what changes are necessary to get your v2 test project ready to upgrade to v3, and it includes a fairly comprehensive list of the changes (and hopefully relatively small bumps in the road) that you can expect. This latter part is provided primarily in resource form, so rather than reading the giant boring lists, you can do a search on the page when you encounter issues with specific types. Once you’ve got your project ported over to v3, the what’s new guide will be useful to understand what new features are available to you with v3.

Please note that you will need to use a version 3.x.y release of the Visual Studio adapter to run v3 tests, as the 2.x.y releases are only capable of running v1 and v2 tests. These 3.x.y builds are capable of running v1, v2, and v3 tests, so that should be your first upgrade, even before you start migrating any tests to Core Framework v3.

As always, we’d like to thank all the users who contributed to the success of xUnit.net through usage, feedback, and code contributions. 🎉

Last Minute Issue Discovered

While verifying the final packages, we discovered a problem with the xunit3-extension template, in that it hadn’t been updated for the recent change to BeforeAfterTestAttribute where we reverted from returning ValueTask to void. This will be fixed in a future release, but it wasn’t deemed important enough to re-cut a new build for. If you are using that extension and want to test it with the SupportedOSAttribute sample that’s in the project, you will need to make the update to fix the signature yourself.

Runner support for Core Framework v3

Supported by the xUnit.net team

Functional:

In-box Console and MSBuild runners
Command line (dotnet test and dotnet vstest) [tested with 17.11.9.46202]
Visual Studio 2022 (Test Explorer) [tested with 17.12.3]
Visual Studio Code [tested with 1.95.3 and C# Dev Kit 1.14.14]

Support for dotnet test, Visual Studio, and Visual Studio Code comes from the Visual Studio runner (a 3.x.y build of xunit.runner.visualstudio).

Supported by third parties

Functional:

NCrunch [requires 5.11 or later]
Resharper/Rider [requires 2024.2 or later]

Status unknown:

CodeRush

Copyright © .NET Foundation. Contributions welcomed at https://github.com/xunit/xunit/tree/gh-pages.