Why is the xUnit Runner not finding my tests

后端 未结 8 1306
陌清茗
陌清茗 2020-11-27 05:25

I have a xUnit.net Test as follows:

static class MyTestClass
{
    [Fact]
    static void MyTestMethod() 
    {
    }
         


        
8条回答
  •  独厮守ぢ
    2020-11-27 05:36

    From http://xunit.github.io/docs/getting-started-desktop.html#run-tests-visualstudio:

    If you're having problems discovering or running tests, you may be a victim of a corrupted runner cache inside Visual Studio. To clear this cache, shut down all instances of Visual Studio, then delete the folder %TEMP%\VisualStudioTestExplorerExtensions. Also make sure your project is only linked against a single version of the Visual Studio runner NuGet package (xunit.runner.visualstudio).

提交回复
热议问题