migrate-xunit-to-xunit-v3

Migrate .NET test projects from xUnit.net v2 to xUnit.net v3.

1|Updated May 21, 2026
One-click install
npx skills add https://github.com/1k-off/umbraco-observability-playground --skill migrate-xunit-to-xunit-v3
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: migrate-xunit-to-xunit-v3
Source: https://github.com/1k-off/umbraco-observability-playground/tree/main/.agents/skills/migrate-xunit-to-xunit-v3
Command: npx skills add https://github.com/1k-off/umbraco-observability-playground --skill migrate-xunit-to-xunit-v3

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

xUnit.net v3 upgrades break test projects that still depend on xUnit.net v2 packages and old APIs, causing compilation failures and failing migrations.

Core Features & Use Cases

  • Package and project reference migration: Switches xunit and related dependencies to the appropriate xunit.v3.* packages and updates xunit.runner.visualstudio to match.
  • Test project configuration updates: Ensures the test projects build correctly by setting OutputType to Exe where required and keeping the correct test platform behavior (VSTest vs Microsoft Testing Platform).
  • Code and API breaking-change remediation: Updates common breaking changes such as removing Xunit.Abstractions usings, converting async void tests to async Task, and handling updated attribute type signatures and other migration-specific transformations.

Quick Start

Use this skill to migrate a .NET solution named MySolution.sln from xUnit.net v2 to xUnit.net v3 and get all tests passing after the required package, configuration, and code updates.

Frequently Asked Questions about migrate-xunit-to-xunit-v3

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

FAQPage Schema
How do I migrate xUnit.net v2 to v3 in a .NET test project?

Migrate xUnit.net v2 to v3 by updating package references to xunit.v3.* packages, configuring test project settings like OutputType to Exe, and fixing breaking API changes such as async void conversions and removed Xunit.Abstractions usings.

Why does my xUnit v3 migration fail to compile after updating NuGet packages?

xUnit v3 migration compilation failures occur due to breaking API changes like removed Xunit.Abstractions usings, updated attribute signatures, and async void tests. Fix these code-level issues and update xunit.runner.visualstudio to resolve compilation errors.

Do I need to change async void tests when upgrading to xUnit v3?

Yes, upgrading to xUnit v3 requires converting async void tests to async Task. This breaking-change remediation is mandatory for test projects to build correctly and ensures the migrated test suite passes successfully.

Can I use xUnit v3 with SDK-style .NET projects and the VSTest platform?

Yes, xUnit v3 supports SDK-style .NET projects. The migration sets OutputType to Exe where required and maintains correct test platform behavior between VSTest and Microsoft Testing Platform to ensure tests run successfully.

What is the best way to update xunit.runner.visualstudio for xUnit v3 compatibility?

The best way to update xunit.runner.visualstudio for xUnit v3 is to map it to the matching version alongside the new xunit.v3.* package references. This ensures the test runner integrates properly and tests execute successfully after migration.