Visual Studio 2019: MSTest unit tests are not running in Test Explorer


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.


  1. Right-click on your test project
  2. Click Manage Nuget Packages
  3. Browse > search for MSTest.TestAdapter > click on MSTest.TestAdapter in the results > click Install

Now your MSTest unit tests will run.

12 thoughts on “Visual Studio 2019: MSTest unit tests are not running in Test Explorer”

  1. This didn’t work for me.
    All tests were running, when all of a sudden they started to show in light blue.
    I hate Microsoft every day a little more. Their products suck.

      • I see there “Could not find schema information for the element ‘serviceRegistry'”. but on another computer its working well with the same properties “settings” on app.config.

        • It sounds like this is an element in a custom schema. Try this:
          1. Click on app.config
          2. XML menu > Create Schema

          If that doesn’t work, could you show me the app.config?

          • Create schema – Its working pretty well. I delete whole .sln from my disk and take latest .sln from server and original report “Could not find schema information for the element ‘serviceRegistry’” does not occurs, but …
            If I run test with attribute //[AllowLocalRun] there is no any information about RUN test. I Usualy have to by – “allow locall run to run test”. Is there som more detailed log to check whats VS is doing? Last time I reinstall whole VS 2019 too … I can send some info via email.

  2. I found:

    No test matches the given testcase filter `FullyQualifiedName=BonusHandling.BonusHandling_Bahniuk.DebitBonus01|FullyQualifiedName=BonusHandling.BonusHandlingTests.DebitBonus01|FullyQualifiedName=BonusHandling.BonusHandlingTests.DebitBonus02|FullyQualifiedName=BonusHandling.BonusHandlingTests.DebitB…` in C:\TFS\MSCP\PRODUCTS\Medio_AS-OCS\MAIN\Projects\AS-OCS_Services\Test\Autotest\!builds\release\net472\NVision.See.Autotest.TestBonusHandling.dll

    • Were these tests working in an earlier version of Visual Studio using MSTest?

      1 – Make sure your tests have the right attributes for MSTest. Ex: [TestMethod]

      2. Make sure you have the updated test packages

  3. It worked!! Amazing. I have spent 3+ hours trying to solve this issue, none of the other posts worked for me, even the ones on the Microsoft forum. But this did the trick. 🙂 thanks a lot.

  4. I had to update MSTest.TestAdapter and the MSTest.TestFramework from 2.2.2 to 2.2.3. I had to right-click the Solution, then click Manage NuGet Packages, and then update the two packages to 2.2.3.

    Note: Comment is paraphrased from an email exchange between the commenter and author (Mak).

  5. There is another case which I saw quite often and is directly related to testing async methods.

    public async void SDKTest()
    => test DOES NOT run

    public async Task SDKTest()
    => test is running OK

    • Thanks Catalin.

      A test will only run if it has a correct signature (as required by the test runner).

      Errors having to do with the test method signature will appear in the Tests output window, and say something like this:

      UTA007: Method does not have correct signature. … if you are using async-await in test method then return-type must be Task.


Leave a Comment