Repository navigation
Move the test project from xUnit v2 to xUnit v3 - #11
Merged
Merged
Conversation
xunit 2.9.3 and its four sub-packages are deprecated on nuget.org (Legacy, successor xunit.v3) and only get security fixes. - Replace xunit 2.9.3 with xunit.v3.mtp-off 4.0.3, the VSTest variant of the xunit3 template: dotnet test, CI and Test Explorer keep working unchanged. Plain xunit.v3 brings Microsoft Testing Platform v2, and dotnet test on the .NET 10 SDK then fails in VSTest mode unless a global.json opts into MTP. - Set OutputType Exe: v3 runs the tests in their own process, started from the app host EvenBetterFastSim.Tests.exe. - Bump Microsoft.NET.Test.Sdk 18.10.0 -> 18.12.0 and xunit.runner.visualstudio 4.0.0 -> 4.0.1 (the template pairing). - CLAUDE.md, AGENTS.md: say xUnit v3 and why mtp-off. The test code needs no change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
xunit2.9.3 is the last v2 release. Since 2026-04-10 it and its four sub-packages (xunit.core,xunit.assert,xunit.extensibility.core,xunit.extensibility.execution) are deprecated on nuget.org as Legacy, withxunit.v3as the successor. They only get security fixes. Only the test project is affected, not the shipped app.Changes
EvenBetterFastSim.Tests/EvenBetterFastSim.Tests.csproj:xunit2.9.3 →xunit.v3.mtp-off4.0.3. This is the VSTest variant of the officialxunit3template (Microsoft.NET.Test.Sdk+xunit.runner.visualstudio+xunit.v3.mtp-off).dotnet test, the commands in CLAUDE.md/AGENTS.md, CI and the Visual Studio Test Explorer keep working unchanged.xunit.v3: in 4.x it pulls in Microsoft Testing Platform v2, anddotnet teston the .NET 10 SDK then fails with "Testing with VSTest target is no longer supported by Microsoft.Testing.Platform on .NET 10 SDK and later" unless aglobal.jsonopts into MTP. Reproduced locally. A comment in the csproj records this.<OutputType>Exe</OutputType>: v3 runs the tests in their own process, started from the app hostEvenBetterFastSim.Tests.exe. The xUnit v3 build targets require an executable.Microsoft.NET.Test.Sdk18.10.0 → 18.12.0 andxunit.runner.visualstudio4.0.0 → 4.0.1: the template's pairing, both the newest stable versions.xunit.analyzersnow resolves to 2.3.0 (was 1.18.0). No new warnings.CLAUDE.md, AGENTS.md: one sentence each saying xUnit v3 and why
mtp-off.The test code needs no change. It uses only
[Fact]andAssert.*. Default parallelization (collections) and the use ofAppContext.BaseDirectorybehave the same in v3.Verification
--filter "FullyQualifiedName~…"still works.dotnet list … package --deprecated --include-transitiveand--vulnerable --include-transitive: nothing reported for the test project.release.ymlpublishes only the app project, soOutputType Exeon the test project does not touch the exe or the zip.windows-latest) is the first check there.Merge
maintriggersrelease.ymland publishes the next prerelease (v1.0.0-build.4 if this lands next).Updateline.git merge-treeof both heads is clean in either order, and the result keepsxunit.v3.mtp-off4.0.3 with SourceLink 10.0.404.Internal board (secsgem/evencoolerfastsim): fixes issue 4.
🤖 Generated with Claude Code