Skip to content

Generated projects fail dotnet test since xunit.v3 4.0 moved to Microsoft.Testing.Platform #422

Description

@devantler

🤖 Generated by the Agentic Engineer

Evidence

🧱 Validate Scaffold has failed on every pull request since #394 (Dependabot, 2026-08-31) bumped xunit.v3 from 3.2.2 to 4.0.0. #393, merged the same day, was the last green run. The check is not required, so twenty-odd PRs have merged over it.

The failing step renames the placeholders in a scratch copy and runs dotnet test, which stops with:

Testing with VSTest target is no longer supported by Microsoft.Testing.Platform on .NET 10 SDK and later.

Reproduced locally on SDK 10.0.302 against this repository's main:

Setup Command Result
as shipped dotnet test the error above, exit 1
global.json opts into the new test runner dotnet test 5 of 5 tests pass, exit 0
as shipped the shared run-dotnet-tests command (dotnet test --no-restore --collect:"XPlat Code Coverage" --logger "console;verbosity=detailed") the same error, exit 1
global.json opts into the new test runner the same shared command zero tests run, exit 5

Who this affects

Anyone who creates a project from this template. Their first dotnet test fails, and the ruleset-injected test workflow from devantler-tech/actions fails too. It stays hidden here because this repository's PRs run no test job, and the shared action's own fixtures still use xunit 2.9.3 on the old runner, so its CI stays green.

Expected behaviour

A freshly generated project passes dotnet test locally and in the shared test workflow, and Validate Scaffold is green again.

Acceptance criteria

  • global.json opts into Microsoft.Testing.Platform, so plain dotnet test passes in a generated project.
  • devantler-tech/actions run-dotnet-tests runs tests and collects coverage under the new runner, for example through the platform's own coverage extension instead of the VSTest --collect and --logger flags, and its fixtures include an xunit.v3 4.x project so this cannot regress unseen.
  • Validate Scaffold passes on a PR here, and a test job passes for a project generated from the template.
  • The two changes land in an order that keeps generated projects working: the shared action first, or both together.

Rough size: S here, M in the shared action.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions