Visual Studio 15.8.1 not running MS unit tests

前端 未结 11 1890
清酒与你
清酒与你 2021-01-31 07:53

When I updated Visual Studio to the latest version, 1 of my test projects stopped running tests and outputted this message:

Test project {} does not reference any .NET N

相关标签:
11条回答
  • 2021-01-31 08:20

    I had to add the following Nuget packages:

    MSTest.TestAdapter
    MSTest.TestFramework
    Microsoft.NET.Test.Sdk
    

    Visual Studio release notes

    0 讨论(0)
  • 2021-01-31 08:26

    Since its just a checkbox, Ive tried disabling the following setting before anything else, and it worked!

    Tools -> Options -> Test -> "For improved performance, only use test adapters in test assembly folder or as specified in runsettings file"

    0 讨论(0)
  • 2021-01-31 08:28

    I had the same issue and none of the answers above worked. Installing NUnit3TestAdapter V3.10.0 fixed it.

    0 讨论(0)
  • 2021-01-31 08:33

    Adding NuGet packages doesn't work for me.

    Disable the following setting (Tools->Options->Test): "For improved performance, only use test adapters in test assembly folder or as specified in runsettings file" works.

    0 讨论(0)
  • 2021-01-31 08:34

    For me I felt very foolish after spending hours, trying EVERYTHING, only to find that I had simply forgotten to add the [TestMethod] directive on the unit test method.

    0 讨论(0)
提交回复
热议问题