I'm trying to use Live Unit Testing in Visual Studio 2022 for a C# class library, but the option seems greyed out. I've verified that I have the Enterprise edition installed and that the project builds successfully. Are there any settings I need to adjust, or is this a known issue with certain project types?
Live Unit Testing only works with .NET Core and .NET Standard projects. If you're targeting .NET Framework, the feature will be disabled. Consider migrating your library to .NET Standard or .NET 6+.
Make sure you have the Microsoft.NET.Test.Sdk package installed in your test project. Without it, Visual Studio can't discover the tests for live execution.
Thanks, both! I changed the target framework to .NET 6 and added the test SDK, and Live Unit Testing is now available.
Leave a Comment