dotnet/skills/plugins/dotnet-test/skills/platform-detection/SKILL.md
platform-detection
Identify a .NET project's test platform, framework, command mode, and SDK-style vs classic project system. Use only for "which test platform/framework?", "VSTest or MTP?", or "what runner does this project use?", including bridge settings, UseVSTest opt-outs, and incompatible or conflicting VSTest/MTP configuration. Resolves global.json, project, packages.config, Directory.Build.props, and Directory.Packages.props precedence for MSTest/xUnit/NUnit/TUnit. For running/filtering tests, exact comman
- Source repository stars
- 5,277
- Declared platforms
- 0
- Static risk flags
- 1
- Last source update
- 2026-08-28
- Source checked
- 2026-08-28
Decision brief
What it does: where it fits
Determine which test platform (VSTest or Microsoft.Testing.Platform) and which test framework (MSTest, xUnit, NUnit, TUnit) a project uses.
Not for
- Tasks that require unconfirmed production actions or broad system permissions.
- Environments where the pinned source and install steps cannot be inspected.
Compatibility matrix
Platform support, with evidence labels
| Platform | Status | Evidence | What to check |
|---|---|---|---|
| Codex | Not declared | No explicit evidence | Portability before use |
| Claude Code | Not declared | No explicit evidence | Portability before use |
| Cursor | Not declared | No explicit evidence | Portability before use |
| Gemini CLI | Not declared | No explicit evidence | Portability before use |
Installation
Inspect first. Install second.
The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.
npx skills add https://github.com/dotnet/skills --skill "plugins/dotnet-test/skills/platform-detection"Inspect the Agent Skill "platform-detection" from https://github.com/dotnet/skills/blob/2b9056bd9152490cc698c5b3e61c9f9a1c135776/plugins/dotnet-test/skills/platform-detection/SKILL.md at commit 2b9056bd9152490cc698c5b3e61c9f9a1c135776. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.
Workflow
What the source asks the agent to do
- 01
Response contract
Honor the user's requested labels and order exactly, substituting the actual classification for every placeholder. Start with the verdict: never put a heading, scratch analysis, tool syntax, or an echoed template before it. Follow with one concise evidence sentence naming the re…
An SDK version pin in global.json is context, not a platform selector. ClaimIf UseVSTest=true is decisive, say that directly. Do not speculate about anIf command mode was not requested, do not add it, even when it was needed - 02
Detecting the project system
Classify the project before selecting a CLI:
Root Sdk attribute or declaration: SDK-style.ToolsVersion, Microsoft.Common.props / Microsoft.CSharp.targets imports,packages.config: classic NuGet dependency management. - 03
Detecting the test framework
Read the .csproj, adjacent packages.config, and Directory.Build.props / Directory.Packages.props and look for:
Read the .csproj, adjacent packages.config, and Directory.Build.props / Directory.Packages.props and look for:In classic projects, package IDs and versions may appear only in packages.config, while the project contains assembly elements with HintPath values. Use both sources. - 04
Detecting the executed test platform
If the user explicitly requests dotnet test mode, read references/command-mode.md before answering. Do not load that reference or mention command mode for a platform/framework-only request.
Final UseVSTest=true selects VSTest. If global.json simultaneouslyA native-MTP selection in global.json executes a compatible MTPOn SDK 8/9, an enabled MTP runner plus final - 05
Conditional and per-target-framework properties
Evaluate runner and bridge properties for each target framework. If conditions produce different executed platforms, report each target explicitly (for example, net8.0: VSTest, net9.0: MTP) rather than collapsing the project to one global platform.
Evaluate runner and bridge properties for each target framework. If conditions produce different executed platforms, report each target explicitly (for example, net8.0: VSTest, net9.0: MTP) rather than collapsing the pr…
Permission review
Static risk signals and limitations
Reads files
The documentation asks the agent to read local files, directories, or repositories.
then read every relevant file that is present in one batched operation:Reads files
The documentation asks the agent to read local files, directories, or repositories.
the web or inspect unrelated files when repository configuration is sufficient.Evidence record
Why each signal appears
| Signal | Value | Evidence type | Meaning |
|---|---|---|---|
| Quality score | 90/100 | Computed | Documentation, specificity, maintenance, and trust rules |
| Repository stars | 5,277 | Source | Repository attention, not individual Skill quality |
| Compatibility | 0 platforms | Source | Declared in the catalog source record |
| Usage guide | automated source guide | Editorial | Generated or reviewed according to the visible evidence level |
Pinned source
Provenance and original SKILL.md
- Repository
- dotnet/skills
- Skill path
- plugins/dotnet-test/skills/platform-detection/SKILL.md
- Commit
- 2b9056bd9152490cc698c5b3e61c9f9a1c135776
- License
- MIT
- Collected
- 2026-08-28
- Default branch
- main
View the original SKILL.md
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.
Response contract
Honor the user's requested labels and order exactly, substituting the actual
classification for every placeholder. Start with the verdict: never put a
heading, scratch analysis, tool syntax, or an echoed template before it. Follow
with one concise evidence sentence naming the repository facts needed to justify
every requested classification. When Framework is requested, name the package
or project SDK that identifies it. Use a second sentence only for a conflict, an
incomplete configuration, or target-framework-specific differences.
Platform means the platform that actually executes tests: VSTest or
MTP. If conflicting or incomplete configuration prevents execution, report
it as unavailable rather than inventing a successful platform.
Apply this scope gate before drafting the evidence:
| User asks for | Evidence to include | Omit |
|---|---|---|
| Platform and framework | Final runner selector and its winning source; package or project SDK identifying the framework; when needed, the property that makes it executable | Command mode; common SDK facts; OutputType unless it is missing or conflicting |
| The single deciding signal | That runner-selection property, why its source wins, and why a competing package does not select or imply VSTest; still name the package or project SDK identifying a requested framework | Bridge, OutputType, SDK mode, and unrelated prerequisites when the configuration is complete |
| Platforms per target framework | Only the conditional final values that differ by target | Common properties and project-wide SDK commentary |
| Explicit opt-out | Final UseVSTest value and its winning source | Superseded defaults unless they create a conflict |
dotnet test mode | The separate command-mode and executed-platform classifications | None of the requested axes |
If the requested labels omit dotnet test mode, do not state or explain command
mode anywhere in the response. An exact bridge property may still be decisive
platform evidence, but do not turn it into SDK or CLI-mode commentary.
When import precedence decides a property, state why the winning source wins (for example, it is imported later or its condition applies), not merely that it contains the final value or overrides another assignment.
Keep the explanation on the requested axis:
- An SDK version pin in
global.jsonis context, not a platform selector. Claim thatglobal.jsonselects VSTest or native MTP only when itstest.runnersetting actually does so. - If
UseVSTest=trueis decisive, say that directly. Do not speculate about an absenttest.runneror describe SDK pinning as an additional platform choice. - If command mode was not requested, do not add it, even when it was needed internally to determine the executed platform.
When a classic-project request also asks for the command family, add a direct
line such as Command family: MSBuild + vstest.console.exe; do not turn it into
an optional alternative or add an unnecessary build qualifier.
For a file-backed request, enumerate the following configuration names once,
then read every relevant file that is present in one batched operation:
global.json, .csproj, packages.config, Directory.Build.props,
Directory.Build.targets, Directory.Packages.props, and explicit imported
.props / .targets. A setting absent from the project file may be defined by
an import, so never infer its final value from the .csproj alone. Do not search
the web or inspect unrelated files when repository configuration is sufficient.
Resolve properties in the actual MSBuild import order, not with a fixed "project beats props" rule. For every applicable target framework:
- Follow the import graph and conditions. A later applicable assignment wins.
Directory.Build.propsis normally imported before the project body, so an unconditional project assignment normally overrides it; later.targetscan override the project again. - Record the final value and its winning source for
UseVSTest, the framework runner selector,TestingPlatformDotnetTestSupport, andOutputType. - Treat
Directory.Packages.propsas version evidence unless it also contains relevant properties. Resolve package/SDK versions before applying version-dependent defaults. - Never infer a property from package presence. A package or SDK default counts only when that resolved version actually supplies it and no later assignment overrides it.
Detecting the project system
Classify the project before selecting a CLI:
- Root
Sdkattribute or<Sdk>declaration: SDK-style. ToolsVersion,Microsoft.Common.props/Microsoft.CSharp.targetsimports, explicit<Reference>and<Compile Include>items: classic non-SDK.packages.config: classic NuGet dependency management.
Classic projects can still use VSTest-compatible adapters, but dotnet test is
not automatically a valid invocation. Preserve repository scripts/CI commands,
commonly MSBuild followed by vstest.console.exe. Mention MSTest.exe only
when repository configuration or documentation establishes that legacy runner.
Detecting the test framework
Read the .csproj, adjacent packages.config, and
Directory.Build.props / Directory.Packages.props and look for:
| Package or SDK reference | Framework |
|---|---|
MSTest metapackage, <Project Sdk="MSTest.Sdk[/version]">, or <Sdk Name="MSTest.Sdk"> | MSTest |
MSTest.TestFramework + MSTest.TestAdapter | MSTest (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-v2 | xUnit |
NUnit + NUnit3TestAdapter | NUnit |
TUnit | TUnit (MTP only) |
In classic projects, package IDs and versions may appear only in
packages.config, while the project contains assembly <Reference> elements
with HintPath values. Use both sources.
Detecting the executed test platform
If the user explicitly requests dotnet test mode, read
references/command-mode.md before answering.
Do not load that reference or mention command mode for a
platform/framework-only request.
For an SDK 8/9 request that explicitly asks about command mode and has no
effective bridge, state all three facts in one causal sentence: the runner makes
the project MTP-capable, dotnet test remains in VSTest mode, and the missing
bridge means VSTest actually executes the tests. Mention that native MTP command
mode starts with SDK 10 only when it helps explain that result.
When execution is permitted and neither the prompt nor global.json identifies
the SDK, run dotnet --version once. For read-only identification requests that
prohibit execution, do not probe the installed SDK; use repository facts and
state any necessary SDK assumption.
After resolving final property values, classify in this order:
- Final
UseVSTest=trueselects VSTest. Ifglobal.jsonsimultaneously selects native MTP command mode, reportPlatform: unavailablebecause the command mode and project opt-out conflict. - A native-MTP selection in
global.jsonexecutes a compatible MTP application with finalOutputType=Exeon MTP. A VSTest-only, library-output, or opted-out project is unavailable. - On SDK 8/9, an enabled MTP runner plus final
TestingPlatformDotnetTestSupport=trueplus finalOutputType=Exeexecutes on MTP. - If the runner is enabled but the bridge is absent or false, a dual-capable
MSTest, NUnit, or xUnit project remains on VSTest: the runner establishes MTP
capability, but SDK 8/9
dotnet testcannot reach it and the VSTest adapter executes the tests instead. If the bridge is true but no runner is enabled, the project also remains on VSTest. - A runner and bridge with non-executable output is incomplete and unavailable. An MTP-only framework that cannot be reached by the selected SDK path is also unavailable, not VSTest.
Keep each signal's role exact:
- The runner property selects the test application.
TestingPlatformDotnetTestSupport=truelets SDK 8/9dotnet testreach that application.OutputType=Exesupplies the executable host shape. It does not select or enable MTP.
Do not confuse the MSTest metapackage with the MSTest.Sdk project SDK.
PackageReference Include="MSTest" plus EnableMSTestRunner=true enables the
MSTest MTP runner, but it does not implicitly set
TestingPlatformDotnetTestSupport.
MSTest.Sdk enables the MTP runner by default. Check its resolved version and
evaluated properties for bridge behavior: version 3.8 supplies
TestingPlatformDotnetTestSupport unless a later assignment overrides it,
while newer SDKs on .NET 10 may expect native MTP mode instead.
<UseVSTest>true</UseVSTest> opts back into VSTest.
| Signal | Meaning |
|---|---|
<Project Sdk="MSTest.Sdk..."> with no UseVSTest | MTP application; inspect the resolved SDK version and evaluated bridge property |
MSTest metapackage + <EnableMSTestRunner>true> | MTP runner enabled; does not imply the VSTest-to-MTP bridge |
<UseMicrosoftTestingPlatformRunner>true | Deciding xUnit runner-selection signal |
<EnableMSTestRunner>true> / <EnableNUnitRunner>true> | Deciding MSTest/NUnit runner-selection signal |
TestingPlatformDotnetTestSupport=true | Execution prerequisite for a VSTest-to-MTP bridge, not the runner-selection signal |
Microsoft.Testing.Platform package | MTP-capable application; not decisive by itself |
TUnit | MTP-only framework |
Final evaluated <OutputType>Exe</OutputType> | Required executable host shape for package-based MTP applications |
Microsoft.NET.Test.Sdk alone is not decisive; it can remain for compatibility
in an MTP-enabled project. When an explicit override decides the result, name
the final override and its source, not the superseded default.
When a runner-selection property competes with Microsoft.NET.Test.Sdk, say
that the runner property selects MTP and Microsoft.NET.Test.Sdk does not
select or imply VSTest. It may remain as compatibility support, but that is
secondary. TestingPlatformDotnetTestSupport=true is a bridge prerequisite, not
the runner-selection signal; never say that this property alone enables the
bridge. For a request asking which single signal decides, stop there. Omit
bridge or host-shape prerequisites when the configuration is complete, and add
them only when needed to explain why the selected runner cannot execute.
Use causal evidence, not a bag of signals. For example:
Platform: MTP
Framework: NUnit
Directory.Build.props supplies final EnableNUnitRunner=true and
TestingPlatformDotnetTestSupport=true, so NUnit executes on MTP.
For an incompatible configuration, give one minimal alignment choice after the verdict without modifying files: either select the project's configured platform globally or remove the project opt-out to use the globally selected platform.
Conditional and per-target-framework properties
Evaluate runner and bridge properties for each target framework. If conditions
produce different executed platforms, report each target explicitly (for
example, net8.0: VSTest, net9.0: MTP) rather than collapsing the project to
one global platform.
Frequently asked questions
What to verify before installation and use
What does the platform-detection source document cover?
Determine which test platform (VSTest or Microsoft.Testing.Platform) and which test framework (MSTest, xUnit, NUnit, TUnit) a project uses.
How do I install platform-detection?
The source record exposes this install command: npx skills add https://github.com/dotnet/skills --skill "plugins/dotnet-test/skills/platform-detection". Inspect the command and pinned source before running it.
Which permission-related actions were detected?
Static rules flagged read-files in the source; the page lists the matching lines and excerpts.
Alternatives
Compare before choosing
coreyhaines31/marketingskills
ab-testing
When the user wants to plan, design, or implement an A/B test or experiment, or build a growth experimentation program. Also use when the user mentions "A/B test," "split test," "experiment," "test this change," "variant copy," "multivariate test," "hypothesis," "should I test this," "which version is better," "test two versions," "statistical significance," "how long should I run this test," "growth experiments," "experiment velocity," "experiment backlog," "ICE score," "experimentation program
garrytan/gbrain
bulk-ingestion
End-to-end discipline for turning any large data source (audio libraries, email takeouts, document corpora, chat exports, API dumps) into brain pages at scale. The lifecycle spine: SCHEMA → ACCESS → TRIAL → EVALUATE → IMPROVE → CODIFY → TEST → SKILLIFY → BULK → MONITOR. State is tracked in a durable JSON manifest (see MANIFEST-PATTERN.md) so any crash, session boundary, or subagent fan-out resumes from ground truth instead of memory.
alirezarezvani/claude-skills
app-store-optimization
App Store Optimization (ASO) toolkit for researching keywords, analyzing competitor rankings, generating metadata suggestions, and improving app visibility on Apple App Store and Google Play Store. Use when the user asks about ASO, app store rankings, app metadata, app titles and descriptions, app store listings, app visibility, or mobile app marketing on iOS or Android. Supports keyword research and scoring, competitor keyword analysis, metadata optimization, A/B test planning, launch checklist
dotnet/skills
migrate-vstest-to-mtp
Migrates .NET test projects from VSTest to Microsoft.Testing.Platform (MTP). Use when user asks to "migrate to MTP", "switch from VSTest", "enable Microsoft.Testing.Platform", "use MTP runner", set OutputType=Exe only for test projects in Directory.Build.props, or mentions EnableMSTestRunner, EnableNUnitRunner, or UseMicrosoftTestingPlatformRunner. USE FOR: MTP behavioral differences vs VSTest (exit code 8, zero tests discovered, --ignore-exit-code, TESTINGPLATFORM_EXITCODE_IGNORE); centralizing