Repository navigation
chore(test): Migrate to Microsoft.Testing.Platform so the test SDK and xunit can move again #189
Description
Microsoft.NET.Test.Sdk, xunit.v3 and xunit.runner.visualstudio are pinned below their
current releases in src/Directory.Packages.props. They were held back in #187 because the
upgrade is a migration, not a bump.
| Package | Held at | Available |
|---|---|---|
Microsoft.NET.Test.Sdk |
18.5.1 | 18.10.1 |
xunit.v3 |
3.2.2 | 4.0.1 |
xunit.runner.visualstudio |
3.1.5 | 4.0.0 |
What happens if you just bump them
The build succeeds and dotnet test then fails on every test project:
Microsoft.Testing.Platform.MSBuild.targets(355,5): error : Testing with VSTest target is no
longer supported by Microsoft.Testing.Platform on .NET 10 SDK and later. If you use dotnet
test, you should opt-in to the new dotnet test experience.
Verified on the .NET 10 SDK with Test SDK 18.10.1 / Microsoft.Testing.Platform 2.4.0.
Why it is not a one-line opt-in
Two documented opt-in routes were tried during #187 and neither worked:
<TestingPlatformDotnetTestSupport>true</TestingPlatformDotnetTestSupport>in the test-project
PropertyGroupofsrc/Directory.Build.props- a
dotnet.configat the repo root with[dotnet.test.runner] name = "Microsoft.Testing.Platform"
Both left the same error. The likely reason is that Microsoft.NET.Test.Sdk and
xunit.runner.visualstudio still pull in the VSTest target, so the real migration probably means
dropping the VSTest adapter rather than toggling a flag — but that was not confirmed.
The part that makes this load-bearing
Coverage moves with it. .github/workflows/ci.yml collects coverage with
--collect:"XPlat Code Coverage", which is a VSTest data collector. Microsoft.Testing.Platform
uses Microsoft.Testing.Extensions.CodeCoverage instead, in a different output format.
scripts/assemble-pages.sh and publish-badges.sh consume ReportGenerator output derived from
coverage/**/coverage.cobertura.xml, so the collector swap has to keep producing Cobertura or
those break too.
src/stryker-config.json already runs
test-runner: mtp per ADR-0001, so Stryker is on Microsoft.Testing.Platform today. That is
evidence the runner works here — and also the reason this migration is worth doing, since the
suite and the mutation sweep would finally agree on one execution path rather than two.
Done when
-
dotnet test src/passes on the current Test SDK and xunit v4 - Coverage still produces Cobertura that ReportGenerator and the badge scripts consume unchanged
- The three packages are removed from the holdback in
src/Directory.Packages.props - ADR-0001 updated if the suite's runner story changes materially
Context: #187.
Activity
chore(deps): Bump 27 NuGet packages, and split analyzers into their o…
bitbiter-dev commentedon Oct 16, 2026
Added to Done when: remove the
ignoreentries forMicrosoft.NET.Test.Sdk,xunit.v3andxunit.runner.visualstudiofrom.github/dependabot.yml(added in #245 so these three stop riding along with routine bumps, as they did in #229).chore(deps): Safe half of #229; hold the test runner for #189 (#245)