Roslyn Analyzer Test Project Upgrade Fix: Replacing Obsolete MSTest Packages in .NET 10

Опубликовано: 29 Июль 2026
на канале: Stef from Samayas
32
1

In this video, I show how to fix a frustrating Roslyn analyzer test project upgrade issue in C# after updating NuGet packages and moving a test project from .NET 9 to .NET 10.

Contents:
0:00 - Introduction
0:10 - Description
0:44 - The Problem
1:44 - The Fix
2:42 - Obsolete Wizard
3:07 - Online Doc
3:44 - Conclusion

Microsoft deprecated several Roslyn testing packages ending in .MSTest, but the documentation is still limited and even the Visual Studio 20262026 analyzer/code fix project wizard can still generate outdated references. That means you can upgrade your solution, follow the normal process, and still end up with obsolete test package references in your project.

I walk through:
How the issue appears after a standard NuGet package upgrade
Why packages ending in .MSTest are now obsolete
The quick fix: removing .MSTest from the affected package references
How to refresh NuGet and install the correct replacement packages
Why the project still builds without changing your analyzer test code
Where Microsoft’s GitHub documentation mentions the change
Why the current wizard output is still misleading

If you are maintaining a Roslyn analyzer, code fix, or source generator test project, this will save you time and help you avoid getting stuck on package deprecations with almost no clear guidance.

Don’t forget to like, subscribe, and leave a comment if you want more videos about .net.

#dotnet #csharp #roslyn

GitHub : https://l.samayas.eu/9bJC5ArAVC

Follow me on X: 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/k7y95TREl0?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&...