.NET 10 Broke dotnet test? | Fix VSTest, MTP and global.json in CI
Published 16/11/2025
Description
Upgrading to .NET 10 can make dotnet test fail even when everything still looks fine inside Visual Studio. Microsoft’s migration guidance says .NET 10 SDK introduces native support for Microsoft.Testing.Platform, and using it with dotnet test now requires opting in through global.json. In this video, I walk through a real .NET 10 upgrade where the solution appears healthy in Visual Studio, but the classic CLI flow dotnet restore, dotnet build, and dotnet test breaks in CI. Microsoft documents that the dotnet test command now has both a VSTest-based implementation and an MTP-based implementation in .NET 10, which is why upgrade behavior can differ from older SDK expectations. 0:00 - Introduction 0:18 - Description 0:59 - Easy Migration 2:03 - dotnet (restore / build / test) 2:51 - The Quick Fix 4:57 - Conclusion What you’ll see: How a .NET 10 upgrade can behave differently between Visual Studio and CLI-based builds. Microsoft’s docs show that .NET 10 changes how dotnet test works by adding native Microsoft.Testing.Platform support. Why VSTest and MTP conflicts cause confusing failures. Microsoft states that when Microsoft.Testing.Platform is opted in via global.json, dotnet test expects all test projects to use Microsoft.Testing.Platform, and it becomes an error if any test projects still use VSTest. Why the error points to aka.ms/dotnet-test-mtp-error. Microsoft’s migration documentation explicitly uses that link in the error guidance for .NET 10 test runner migration. How to fix the issue with global.json. Microsoft’s migration guide says that to use Microsoft.Testing.Platform with .NET 10 SDK and later, you must specify the test runner as Microsoft.Testing.Platform in global.json. Why this matters for CI and Azure DevOps pipelines. Any pipeline that runs dotnet test against upgraded SDKs can hit this mismatch if the test runner configuration is not aligned. Microsoft’s CLI documentation describes this as a runtime expectation of the sel