Move .NET 10 Tests to Microsoft.Testing.Platform with MSTest.Sdk

Опубликовано: 21 Июнь 2026
на канале: Stef from Samayas
512
10

Move your .NET 10 test projects from older VSTest-style setups to MSTest.Sdk and Microsoft.Testing.Platform without rewriting all your tests. Microsoft says MSTest.Sdk is the recommended target for most users, and by default it discovers and runs tests using the MSTest runner for Microsoft.Testing.Platform.

In this video, I walk through what Microsoft.Testing.Platform is, why Microsoft introduced it, and how to migrate both new and existing MSTest projects to the newer model. Microsoft describes Microsoft.Testing.Platform as a lightweight and portable alternative to VSTest, and says it works across CI pipelines, the .NET CLI, Visual Studio Test Explorer, and VS Code Test Explorer.

0:00 - Introduction
0:10 - Description
2:18 - New Project
5:53 - Upgrade Project
7:32 - Global.json
7:55 - NuGet Upgrade
9:51 - Visual Studio
11:21 - Extensibility
11:48 - Cmd
14:18 - Run
15:21 - Conclusion

What you’ll see:

How to create a brand-new test project with MSTest.Sdk. Microsoft’s getting-started guidance says the recommended way to create an MSTest project is to use MSTest.Sdk.

How to upgrade an existing classic test project. Microsoft says you can enable MSTest.Sdk by updating the Sdk attribute on the Project node.

Why this is mostly a project-configuration change. Microsoft’s docs emphasize that MSTest.Sdk is an MSBuild project SDK for building MSTest apps and is designed to provide a first-class MSTest experience with sensible defaults.

What happens in Visual Studio and with dotnet test. Microsoft says you can use the same tooling, including dotnet test and Visual Studio, as with other test projects.

Why MTP exists at all. Microsoft says the platform was designed to address long-standing issues in the testing architecture and to provide compile-time extension registration and zero-dependency core behavior.

This walkthrough is useful if you want to modernize MSTest projects, understand when global.json matters, and see how the MTP model changes CLI and IDE behavior without forcing a full rewrite of your tests. Microsoft also says you can switch back to VSTest with UseVSTest true UseVSTest if you need compatibility during migration.
#DotNet10 #MSTest #MicrosoftTestingPlatform

Subscribe to my X account https://l.samayas.eu/jo3eaYEf3E?P=YT&...

Buy me a Coffee : https://l.samayas.eu/jX6xL7EWhd?P=YT&...

Studio Equipment
Camera Sony Alpha ZV-E10 II: https://l.samayas.eu/k7y90TREl0?P=YT&...
Secondary Camera Obsbot Tail Air: https://l.samayas.eu/iFQu9WfmCw?P=YT&...
Elgato Prompter: https://l.samayas.eu/fHVrqqXtSc?P=YT&...
Microphone Rode Wireless GO II: https://l.samayas.eu/afBINjiBXN?P=YT&...