Skip to content

Bump xunit.v3 and runner to 4.0.0 alongside Xunit.DependencyInjection 12.0.1 - #44

Merged
marklauter merged 1 commit into
mainfrom
chore/xunit-v4
Sep 5, 2026
Merged

marklauter merged 1 commit into
mainfrom
chore/xunit-v4

Conversation

@marklauter

Copy link
Copy Markdown
Owner

Supersedes #42.

Dependabot bumped Xunit.DependencyInjection 11.3.1 → 12.0.1 on its own in #42. That version targets xunit.v3 4.x, so it resolved xunit.v3.extensibility.core / xunit.v3.common 4.0.0 against the pinned 3.2.2 packages and failed restore with NU1608 (warning-as-error), taking test (Debug), test (Release), format, and submit-nuget down with it.

Bumping xunit.v3 and xunit.runner.visualstudio to 4.0.0 alongside it fixes the restore, but surfaces a second problem: xunit.v3 4.x makes the Microsoft.Testing.Platform runner the default entry point and drops the VSTest bridge that shipped as xunit.v3.core.mtp-v1 in 3.2.2. Under MTP, dotnet test errors with MTP0001 ("Testing with VSTest target is no longer supported…"), and opting into MTP mode via global.json runs the tests but writes no cobertura report — coverlet.msbuild hooks the VSTest target. That would silently drop the coverage ratchet, break the coverage-cobertura artifact upload (if-no-files-found: error), and break the shared build gate, which passes VSTest --logger args.

Setting IsTestingPlatformApplication=false for test projects keeps the VSTest entry point through xunit.runner.visualstudio 4.0.0, so coverage and the ratchet are untouched. Migrating to MTP mode properly is a larger change — replacing coverlet.msbuild with the MTP coverage extension and reworking the threshold gate — and is left for its own PR.

Verified locally: build gate green (format → build → test), 144/144 tests passing in both Debug and Release, coverage 99.32/92.44/95.31 against the 95/90/95 floors.

🤖 Generated with Claude Code

https://claude.ai/code/session_018oQ2H2BWF3GVGTR9udJTRG

… 12.0.1

Xunit.DependencyInjection 12.0.1 targets xunit.v3 4.x, so bumping it alone
resolved xunit.v3.extensibility.core 4.0.0 against the pinned 3.2.2 packages
and failed restore with NU1608 (dependabot PR #42). Bump xunit.v3 and
xunit.runner.visualstudio to 4.0.0 with it.

xunit.v3 4.x makes the Microsoft.Testing.Platform runner the default entry
point, which drops the VSTest target coverlet.msbuild hooks — `dotnet test`
then errors out and no cobertura report is written, taking the coverage
ratchet and the CI coverage artifact with it. Set
IsTestingPlatformApplication=false for test projects to keep the VSTest entry
point via xunit.runner.visualstudio 4.0.0.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018oQ2H2BWF3GVGTR9udJTRG
@marklauter
marklauter merged commit 84e755f into main Sep 5, 2026
8 checks passed
@marklauter
marklauter deleted the chore/xunit-v4 branch September 5, 2026 18:22
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.

1 participant