Skip to content

Migrate unit tests from xunit v2 to xunit.v3 - #9

Merged
ardalis merged 1 commit into
mainfrom
xunit-v3-main
Nov 25, 2026
Merged

ardalis merged 1 commit into
mainfrom
xunit-v3-main

Conversation

@ardalis

@ardalis ardalis commented Nov 25, 2026

Copy link
Copy Markdown
Contributor

Closes #5.

This re-lands #8. That PR was merged into net11-upgrade after #4 had already been squash-merged into main, so its changes never reached main. This PR is the same commit cherry-picked onto main. See #8 for the full description.

Summary

  • xunit 2.9.3 → xunit.v3 4.0.3, and the test project is now an Exe
  • New global.json opts into Microsoft.Testing.Platform for dotnet test (required by xunit.v3 4.x on the .NET 10+ SDK) and pins the SDK to 11.0.100 with latestFeature
  • Dropped Microsoft.NET.Test.Sdk and xunit.runner.visualstudio; replaced coverlet.collector with coverlet.MTP 10.1.1

Test plan

  • dotnet build -c Release succeeds with no warnings
  • dotnet test: 10/10 tests pass on net11.0
  • CI green

🤖 Generated with Claude Code

- xunit 2.9.3 -> xunit.v3 4.0.3 (test project is now an Exe)
- Opt into the MTP dotnet test experience via global.json (required by
  xunit.v3 4.x on the .NET 10+ SDK); pin SDK 11.0.100 with latestFeature
- Replace VSTest-only packages: drop Microsoft.NET.Test.Sdk and
  xunit.runner.visualstudio; coverlet.collector -> coverlet.MTP 10.1.1

Closes #5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Migrate unit tests from xunit v2 to xunit.v3

1 participant