migrate-vstest-to-mtp

Migrates .NET test projects from VSTest to Microsoft.Testing.Platform.

1|Updated Jun 1, 2026
One-click install
npx skills add https://github.com/D1ssolve/craft-agents --skill migrate-vstest-to-mtp-d1ssolve
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: migrate-vstest-to-mtp
Source: https://github.com/D1ssolve/craft-agents/tree/main/skills/migrate-vstest-to-mtp
Command: npx skills add https://github.com/D1ssolve/craft-agents --skill migrate-vstest-to-mtp-d1ssolve

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Migrating .NET test projects from VSTest to Microsoft.Testing.Platform (MTP) involves many framework-specific configuration changes, CLI argument translations, and CI/CD updates that are easy to get wrong, such as mixing VSTest and MTP projects or hitting unexpected exit code 8 failures. ## Core Features & Use Cases - Runner Enablement: Configures the correct MTP opt-in property for MSTest (EnableMSTestRunner or MSTest.Sdk), NUnit (EnableNUnitRunner), xUnit.net v2 (YTest.MTP.XUnit2), and xUnit.net v3 (UseMicrosoftTestingPlatformRunner). - CLI Argument Translation: Converts VSTest arguments like --logger trx, --blame, and --collect into MTP equivalents, including xUnit.net v3 filter migration to --filter-class, --filter-trait, and --filter-query. - CI/CD and Config Updates: Updates Azure DevOps and GitHub Actions pipelines, configures global.json or TestingPlatformDotnetTestSupport based on SDK version, and centralizes settings in Directory.Build.props. - Use Case: A team with a solution of MSTest and xUnit projects wants to adopt MTP for Native AOT test execution; this Skill walks through assessment, runner setup, argument translation, pipeline updates, and verification. ## Quick Start Migrate the test projects in my solution from VSTest to Microsoft.Testing.Platform and update the CI pipeline accordingly.

Frequently Asked Questions about migrate-vstest-to-mtp

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I migrate .NET tests from VSTest to Microsoft.Testing.Platform?

Enable the framework-specific MTP runner property (EnableMSTestRunner, EnableNUnitRunner, or UseMicrosoftTestingPlatformRunner), set OutputType to Exe, configure dotnet test integration via global.json on .NET 10+ or TestingPlatformDotnetTestSupport on earlier SDKs, then translate CLI arguments and update CI pipelines.

How do I enable MTP for NUnit or xUnit.net test projects?

For NUnit, update NUnit3TestAdapter to 5.0.0+ and set EnableNUnitRunner to true. For xUnit.net v2, add the YTest.MTP.XUnit2 package; for xUnit.net v3, set UseMicrosoftTestingPlatformRunner to true. All non-MSTest.Sdk setups also require OutputType set to Exe.

Does Microsoft.Testing.Platform support the VSTest --filter syntax?

MSTest, NUnit, and xUnit.net v2 (via YTest.MTP.XUnit2) keep the same VSTest --filter syntax on MTP. xUnit.net v3 does not support it and requires native filters like --filter-class, --filter-trait, or --filter-query with the xUnit.net query filter language.

Why does dotnet test fail with exit code 8 after migrating to MTP?

MTP returns exit code 8 when zero tests are discovered, whereas VSTest silently succeeded. Pass --ignore-exit-code 8, set the TESTINGPLATFORM_EXITCODE_IGNORE environment variable, or add the argument via TestingPlatformCommandLineArguments in Directory.Build.props.

When should I not migrate a test project to Microsoft.Testing.Platform?

Do not migrate UWP or packaged WinUI test projects, solutions mixing .NET and non-.NET test adapters, or when you only need a test framework or MSTest version upgrade. Mixing VSTest and MTP projects in one solution is unsupported.