From xUnit v2 to v3 and 4.0: Reading and Migrating Old Test Projects
Migrating an xUnit v2 project to v3 means collapsing the packages into one, making the project an executable and changing a few signatures; the real risk when moving to 4.0 is extensibility code that compiles but behaves differently. A custom ITestCaseOrderer written for 3.x compiled without warnings on 4.0.2 and silently stopped ordering methods. A step-by-step migration with real build errors, dotnet new xunit still producing v2, xunit-console-tool and a checklist.
8 Nov 2026
·
9 min
·
5