Skip to content

[Feature]: Microsoft.Testing.Platform (MTP) support in Test Explorer #249

Description

@validide

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.

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

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions