Agent skill · Testing & QA

migrate-xunit-to-mstest

Convert .NET test projects from xUnit.net v2 or v3 to MSTest v4. Use for replacing xunit packages, [Fact]/[Theory], xUnit assertions, fixtures, ITestOutputHelper, traits, skips, and xUnit parallelization with MSTest equivalents while preserving the current VSTest or MTP runner. DO NOT USE FOR: xUnit v2 to v3 upgrades, MSTest version upgrades, migrations from NUnit/TUnit, or runner-only VSTest to MTP migrations.

dotnetgithub.com/dotnetGitHub ↗
claude-codeMIT
Install
npx skills add dotnet/skills --skill migrate-xunit-to-mstest --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 2
SKILL.md size: 10 KB
Bundled scripts: none
Path: plugins/dotnet-test-migration/skills/migrate-xunit-to-mstest/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 4,927
Language: C#
Read our review of the source →

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# xUnit -> MSTest Migration Convert xUnit.net v2 or v3 tests to MSTest v4 without changing the target framework or test platform. A successful migration builds, discovers the same tests, and preserves pass/fail results and execution semantics. ## Scope Use this skill only when the project contains xUnit packages or source and the user wants MSTest. If the project already uses MSTest and contains no xUnit tests, report that no framework migration is needed and make no changes. Do not combine this framework conversion with a target-framework upgrade or VSTest/MTP migration. Complete and verify one migration before starting another. ## Response Mode - **Full migration request:** inspect the project, make the edits, build, and run tests. Do not stop after giving a plan. - **Focused compile error or API question:** inspect the relevant code and apply only that mapping. Do not narrate the entire workflow. - **Unsupported target framework:** stop before changing packages. MSTest v4 requires .NET 8+ or .NET Framework 4.6.2+ for test applications; offer a separately approved TFM upgrade or MSTest v3 as the intermediate target. For detailed mappings and examples, search [`references/mapping-

What's inside
Steps it walks through
  1. Scope
  2. Response Mode
  3. Fast Path
  4. Workflow
  5. 1. Establish the baseline
  6. 2. Replace packages without switching runners
  7. 3. Perform the mechanical conversion
  8. 4. Resolve semantic mappings
  9. 5. Preserve lifecycle, fixture scope, and parallelization
  10. 6. Verify parity
  11. Completion Criteria
  12. Follow-up
Ships with 1 file
  • references/mapping-cheatsheet.md
More from skills
All skills →
About this skill
What does the migrate-xunit-to-mstest skill do?

Convert .NET test projects from xUnit.net v2 or v3 to MSTest v4. Use for replacing xunit packages, [Fact]/[Theory], xUnit assertions, fixtures, ITestOutputHelper, traits, skips, and xUnit parallelization with MSTest equivalents while preserving the current VSTest or MTP runner. DO NOT USE FOR: xUnit v2 to v3 upgrades, MSTest version upgrades, migrations from NUnit/TUnit, or runner-only VSTest to MTP migrations.

How do I install it?

Run `npx skills add dotnet/skills --skill migrate-xunit-to-mstest --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From dotnet/skills, a repository with 4,927 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going