Why is the xUnit Runner not finding my tests

后端 未结 8 1307
陌清茗
陌清茗 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:41

    (As referred to by @Kyle in the comments on the other answer) The same No tests found to run message can result from using NuGet to get xUnit.dll and ending up with version 2.0.0 (which is currently marked as prerelease as some core functionality like discovering of v1 tests etc. has yet to be implemented in that branch).

    The resolution in this case is to select Stable Only versions (as opposed to Include Prerelease) in the NuGet package manager.

提交回复
热议问题