VSTest: A testsettings file or a runsettings with a ForcedLegacyMode set to true is not supported with the MSTest V2 Adapter. No test is available

后端 未结 2 1586
眼角桃花
眼角桃花 2020-12-31 10:30

How to use .testsettings file running unit tests via vstest.console.exe? I created empty visual studio solution, created empty unit test project, a

2条回答
  •  星月不相逢
    2020-12-31 10:50

    The solution is to use Microsoft.VisualStudio.QualityTools.UnitTestFramework instead of Microsoft.VisualStudio.TestPlatform.TestFramework which is added to your unit test project by Visual Studio by default. So you can remove two packages via NuGet. You should delete MSTest.TestAdapter and MSTest.TestFramework and install Microsoft.VisualStudio.QualityTools.UnitTestFramework.Updated. Your unit tests will be discovered after these steps.

    Also you can read the following useful article about test framework MSTest V2.

提交回复
热议问题