Problem / motivation
The Test Explorer is VSTest end-to-end (dotnet test --list-tests, dotnet vstest --ListFullyQualifiedTests, dotnet test --filter … --logger trx, TRX parsing). MTP-only projects get only the degraded DisplayName fallback (TEST-EXPLORER-SPEC.md mentions MTP once), and runs fail.
This is becoming the common case: on .NET 10 SDK, MTP v2 removed the VSTest target shim, and xunit.v3 4.0.0 defaults to MTP v2. Concretely broken against an MTP-only project:
- Discovery pass 1 (
dotnet test --list-tests --nologo) — --nologo is rejected in MTP mode (exit code 5, zero tests; verified locally).
- Discovery pass 2 (
dotnet vstest <assembly>) — cannot load an MTP-only assembly.
- Execution (
--filter FullyQualifiedName=, --logger trx) — these don't exist in MTP mode (MTP uses --filter-class etc. / --report-trx).
Repro: .NET 10 SDK, xUnit v3 project (xunit.v3 4.0.0, <UseMicrosoftTestingPlatformRunner>true</UseMicrosoftTestingPlatformRunner>), global.json with {"test": {"runner": "Microsoft.Testing.Platform"}}, open in VS Code with SharpLsp.
Proposed solution
Detect MTP projects (Microsoft.Testing.Platform reference or test.runner: Microsoft.Testing.Platform in global.json) and switch them to an MTP path: MTP-mode dotnet test --list-tests for discovery, framework filter options for runs, TRX-report extension (or MTP result protocol) for outcomes. Happy to provide a sample repo or test a preview build.
Language relevance
Both C# and F#
Alternatives considered
Running tests via CLI outside the Testing view (works, but loses the explorer); Visual Studio / Rider / C# Dev Kit already run MTP projects in their Test Explorers.
Problem / motivation
The Test Explorer is VSTest end-to-end (
dotnet test --list-tests,dotnet vstest --ListFullyQualifiedTests,dotnet test --filter … --logger trx, TRX parsing). MTP-only projects get only the degraded DisplayName fallback (TEST-EXPLORER-SPEC.mdmentions MTP once), and runs fail.This is becoming the common case: on .NET 10 SDK, MTP v2 removed the VSTest target shim, and
xunit.v34.0.0 defaults to MTP v2. Concretely broken against an MTP-only project:dotnet test --list-tests --nologo) —--nologois rejected in MTP mode (exit code 5, zero tests; verified locally).dotnet vstest <assembly>) — cannot load an MTP-only assembly.--filter FullyQualifiedName=,--logger trx) — these don't exist in MTP mode (MTP uses--filter-classetc. /--report-trx).Repro: .NET 10 SDK, xUnit v3 project (
xunit.v34.0.0,<UseMicrosoftTestingPlatformRunner>true</UseMicrosoftTestingPlatformRunner>),global.jsonwith{"test": {"runner": "Microsoft.Testing.Platform"}}, open in VS Code with SharpLsp.Proposed solution
Detect MTP projects (
Microsoft.Testing.Platformreference ortest.runner: Microsoft.Testing.Platforminglobal.json) and switch them to an MTP path: MTP-modedotnet test --list-testsfor discovery, framework filter options for runs, TRX-report extension (or MTP result protocol) for outcomes. Happy to provide a sample repo or test a preview build.Language relevance
Both C# and F#
Alternatives considered
Running tests via CLI outside the Testing view (works, but loses the explorer); Visual Studio / Rider / C# Dev Kit already run MTP projects in their Test Explorers.