I have a unit test project in Visual Studio 2019. When I click Run All Tests, none of the tests run.
I looked in the Tests output window and saw a message that says:
Test project does not reference any .NET NuGet Adapter. Test discovery or execution might not work for this project.
It’s recommended to reference NuGet test adapters in each test project in the solution.
Note: This is different from the scenario where one test prevents other tests from running.
- Right-click on your test project
- Click Manage Nuget Packages…
- Browse > search for MSTest.TestAdapter > click on MSTest.TestAdapter in the results > click Install
Now your MSTest unit tests will run.
If it’s still not working, then install / update Microsoft.NET.Test.Sdk and MSTest.TestFramework as well. Note: Thanks to the readers for pointing this out.