Fix .NET 10 Tests in Azure DevOps | MTP Migration, VSTest Conflicts and Code Coverage
Published 08/12/2025
Description
Fix broken .NET 10 test pipelines in Azure DevOps by migrating from older VSTest-style dotnet test usage to Microsoft.Testing.Platform and restoring code coverage and reporting in the process. Starting with .NET 10, Microsoft says you must opt in to Microsoft.Testing.Platform through global.json, and dotnet test becomes an error if some test projects still use VSTest while others use MTP. In this video, I walk through the full migration path in Azure DevOps: identifying the old VSTest-style arguments, translating them to the newer MTP flow, fixing the pipeline, and getting test and coverage reporting back into the build summary. Azure Pipelines supports publishing code coverage results, and the PublishCodeCoverageResults v2 task can publish coverage output back into the pipeline experience. 0:00 - Introduction 0:17 - Description 0:48 - Local Project 1:36 - VSTest Syntax 2:22 - Conversion 4:15 - Temporary Fixed Pipeline 4:37 - Migrated Pipeline 5:48 - Conclusion What you’ll see in this video: How .NET 10 test execution changes once Microsoft.Testing.Platform is enabled. Microsoft documents native dotnet test support for MTP in .NET 10 and later. How to migrate away from legacy VSTest assumptions in Azure DevOps. Microsoft’s migration guide is specifically focused on moving from VSTest to Microsoft.Testing.Platform and mapping arguments correctly. How to restore code coverage after the switch. Azure Pipelines can publish coverage results from test runs, and the PublishCodeCoverageResults task is designed to surface those results in the pipeline summary. How to republish test and coverage outputs cleanly in CI. Azure Pipelines’ .NET ecosystem guidance and coverage documentation both support this reporting workflow. How to keep the pipeline readable and future-ready. Azure DevOps now has first-class DotNetCoreCLI support for Microsoft.Testing.Platform in newer task versions, which makes the long-term path cleaner than fragile workarounds. Th