Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
managedcode avatar

Platform Detection

  • 17 installs
  • 466 repo stars
  • Updated July 25, 2026
  • managedcode/dotnet-skills

Helps with ai & agent building tasks.

About

platform-detection is a Claude Code skill for ai & agent building. It helps solo builders move faster with AI-assisted coding.

  • platform-detection
  • AI & Agent Building
  • AI-coding skill

Platform Detection by the numbers

  • 17 all-time installs (skills.sh)
  • +1 installs in the week ending Aug 2, 2026 (Skillselion tracking)
  • Ranked #10,861 of 16,546 AI & Agent Building skills by installs in the Skillselion catalog
  • Data as of Aug 3, 2026 (Skillselion catalog sync)
npx skills add https://github.com/managedcode/dotnet-skills --skill platform-detection

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs17
repo stars466
Last updatedJuly 25, 2026
Repositorymanagedcode/dotnet-skills

What it does

Helps with ai & agent building tasks.

Files

SKILL.mdMarkdownGitHub ↗

Test Platform and Framework Detection

Determine which test platform (VSTest or Microsoft.Testing.Platform) and which test framework (MSTest, xUnit, NUnit, TUnit) a project uses.

Detection files to always check (in order): global.json.csprojDirectory.Build.propsDirectory.Packages.props

Detecting the test framework

Read the .csproj file and Directory.Build.props / Directory.Packages.props (for centrally managed dependencies) and look for:

Package or SDK referenceFramework
MSTest (metapackage, recommended) or <Sdk Name="MSTest.Sdk">MSTest
MSTest.TestFramework + MSTest.TestAdapterMSTest (also valid for v3/v4)
xunit, xunit.v3, xunit.v3.mtp-v1, xunit.v3.mtp-v2, xunit.v3.core.mtp-v1, xunit.v3.core.mtp-v2xUnit
NUnit + NUnit3TestAdapterNUnit
TUnitTUnit (MTP only)

Detecting the test platform

The detection logic depends on the .NET SDK version. Run dotnet --version to determine it.

.NET SDK 10+

On .NET 10+, the global.json test.runner setting is the authoritative source:

  • If global.json contains "test": { "runner": "Microsoft.Testing.Platform" }MTP
  • If global.json has "runner": "VSTest", or no test section exists → VSTest
Important: On .NET 10+, <TestingPlatformDotnetTestSupport> alone does not switch to MTP. The global.json runner setting takes precedence. If the runner is VSTest (or unset), the project uses VSTest regardless of TestingPlatformDotnetTestSupport.

.NET SDK 8 or 9

On older SDKs, check these signals in priority order:

1. Check the `<TestingPlatformDotnetTestSupport>` MSBuild property. Look in the .csproj, Directory.Build.props, and Directory.Packages.props. If set to true in any of these files, the project uses MTP.

Critical: Always read Directory.Build.props and Directory.Packages.props if they exist. MTP properties are frequently set there instead of in the .csproj, so checking only the project file will miss them.

2. Check project-level signals:

SignalPlatform
<Sdk Name="MSTest.Sdk"> as project SDKMTP by default
<UseMicrosoftTestingPlatformRunner>true</UseMicrosoftTestingPlatformRunner>MTP runner (xUnit)
<EnableMSTestRunner>true</EnableMSTestRunner>MTP runner (MSTest)
<EnableNUnitRunner>true</EnableNUnitRunner>MTP runner (NUnit)
Microsoft.Testing.Platform package referenced directlyMTP
TUnit package referencedMTP (TUnit is MTP-only)
Note: The presence of Microsoft.NET.Test.Sdk does 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.
Key distinction: VSTest is the classic platform that uses vstest.console under the hood. Microsoft.Testing.Platform (MTP) is the newer, faster platform. Both can be invoked via dotnet test, but their filter syntax and CLI options differ.

Related skills

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.