migrate-xunit-to-mstest
Installation
SKILL.md
xUnit -> MSTest Migration
Migrate a .NET test project from xUnit.net (v2 or v3) to MSTest v4. The outcome is a project that:
- References MSTest v4 packages (or
MSTest.Sdk4.x) instead ofxunit*/xunit.v3.* - Has every
[Fact]/[Theory]rewritten as[TestMethod]and every assertion mapped to the MSTest equivalent - Builds cleanly with the same target framework
- Passes the same set of tests (modulo intentional changes documented below)
- Preserves the current test platform (VSTest stays on VSTest; MTP stays on MTP)
This is a cross-framework migration. Do not bundle it with a version upgrade or a platform switch in the same pass -- if both are needed, do this skill first, commit, then run migrate-mstest-v3-to-v4 (if you stopped on v3) or migrate-vstest-to-mtp.
When to Use
- The project references
xunit,xunit.assert,xunit.core,xunit.extensibility.core/execution,xunit.abstractions, or anyxunit.v3.*package, and you want to switch to MSTest - You want a single .NET test framework across a solution that today mixes xUnit and MSTest