migrate-xunit-to-xunit-v3
Migrates .NET test projects from xUnit.net v2 to xUnit.net v3. USE FOR: upgrading xunit to xunit.v3. DO NOT USE FOR: migrating between test frameworks (MSTest/NUnit to xUnit.net), migrating from VSTest to Microsoft.Testing.Platform (use migrate-vstest-to-mtp). For xUnit v3 MTP filter syntax (--filter-class, --filter-trait, --filter-query), also load migrate-vstest-to-mtp.
npx skills add dotnet/skills --skill migrate-xunit-to-xunit-v3 --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# xunit.v3 Migration Migrate .NET test projects from xUnit.net v2 to xUnit.net v3. The outcome is a solution where all test projects reference `xunit.v3.*` packages, compiles cleanly, and all tests pass with the same results as before migration. ## When to Use - Upgrading test projects from `xunit` (v2) packages to `xunit.v3` - Resolving compilation errors after updating xunit package references to v3 ## When Not to Use - Migrating between test frameworks (e.g., MSTest or NUnit to xUnit.net) — different effort entirely - Migrating from VSTest to Microsoft.Testing.Platform — use `migrate-vstest-to-mtp` - The projects already reference `xunit.v3` — migration is done ## Inputs | Input | Required | Description | |-------|----------|-------------| | Test project or solution | Yes | The .NET project or solution containing xUnit.net v2 test projects | ## Workflow > **Commit strategy:** Commit after each major step so the migration is reviewable and bisectable. Separate project file changes from code changes. > **Prioritization:** Steps 1-5 are required for every migration. Steps 6-12 are conditional — only apply the ones relevant to the project's code patterns. Skip steps that don't apply
- When to Use
- When Not to Use
- Inputs
- Workflow
- Step 1: Identify xUnit.net projects and verify compatibility
- Step 2: Update package references
- Step 3: Set OutputType to Exe
- Step 4: Configure test platform
- Step 5: Remove Xunit.Abstractions usings
- Step 6: Address async void breaking change (if applicable)
- Step 7: Address breaking change of attributes (if applicable)
- Step 8: Inheriting from FactAttribute or TheoryAttribute (if applicable)
- Step 9: Inheriting from BeforeAfterTestAttribute (if applicable)
- Step 10: Address new xUnit analyzer warnings (if applicable)
What does the migrate-xunit-to-xunit-v3 skill do?
Migrates .NET test projects from xUnit.net v2 to xUnit.net v3. USE FOR: upgrading xunit to xunit.v3. DO NOT USE FOR: migrating between test frameworks (MSTest/NUnit to xUnit.net), migrating from VSTest to Microsoft.Testing.Platform (use migrate-vstest-to-mtp). For xUnit v3 MTP filter syntax (--filter-class, --filter-trait, --filter-query), also load migrate-vstest-to-mtp.
How do I install it?
Run `npx skills add dotnet/skills --skill migrate-xunit-to-xunit-v3 --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.
