Loading...
Loading...
Reference data for detecting the test platform (VSTest vs Microsoft.Testing.Platform) and test framework (MSTest, xUnit, NUnit, TUnit) from project files. DO NOT USE directly — loaded by run-tests, mtp-hot-reload, and migrate-vstest-to-mtp when they need detection logic.
npx skill4agent add dotnet/skills platform-detectionglobal.json.csprojDirectory.Build.propsDirectory.Packages.props.csprojDirectory.Build.propsDirectory.Packages.props| Package or SDK reference | Framework |
|---|---|
| MSTest |
| MSTest (also valid for v3/v4) |
| xUnit |
| NUnit |
| TUnit (MTP only) |
dotnet --versionglobal.jsontest.runnerglobal.json"test": { "runner": "Microsoft.Testing.Platform" }global.json"runner": "VSTest"testImportant: On .NET 10+,alone does not switch to MTP. The<TestingPlatformDotnetTestSupport>runner setting takes precedence. If the runner is VSTest (or unset), the project uses VSTest regardless ofglobal.json.TestingPlatformDotnetTestSupport
<TestingPlatformDotnetTestSupport>.csprojDirectory.Build.propsDirectory.Packages.propstrueCritical: Always readandDirectory.Build.propsif they exist. MTP properties are frequently set there instead of in theDirectory.Packages.props, so checking only the project file will miss them..csproj
| Signal | Platform |
|---|---|
| MTP by default |
| MTP runner (xUnit) |
| MTP runner (MSTest) |
| MTP runner (NUnit) |
| MTP |
| MTP (TUnit is MTP-only) |
Note: The presence ofdoes not necessarily mean VSTest. Some frameworks (e.g., MSTest) pull it in transitively for compatibility, even when MTP is enabled. Do not use this package as a signal on its own — always check the MTP signals above first.Microsoft.NET.Test.Sdk
Key distinction: VSTest is the classic platform that usesunder the hood. Microsoft.Testing.Platform (MTP) is the newer, faster platform. Both can be invoked viavstest.console, but their filter syntax and CLI options differ.dotnet test