title: Why can't xUnit find my DNX tests?
body: <p>I'm starting a new ASP.net vNext / MVC6 project and I want to use xUnit to test it.</p>
  
  <p>I've followed the <a href="https://xunit.github.io/docs/getting-started-dnx.html" rel="nofollow noreferrer">instructions on the xUnit web site</a> for DNX projects.</p>
  
  <p>When I try to run the tests in Visual Studio, either using the built-in runner or in ReSharper, I get this error message:</p>
  
  <p><a href="https://i.stack.imgur.com/AO7S6.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/AO7S6.png" alt="Test Runner error message"></a></p>
  
  <p>If I try to run the tests from the command line, I get this:</p>
  
  <pre>
  xUnit.net DNX Runner (32-bit DNX 4.5.1)
    Discovering: TA.Product.Tests
    Discovered:  TA.Product.Tests
    Starting:    TA.Product.Tests
      TA.Product.Tests.Class1.FactMethodName [FAIL]
        System.NullReferenceException : Object reference not set to an instance of an object.
        Stack Trace:
          D:\VS-Projects\TA.Product\src\TA.Product.Tests\Class1.cs(25,0): at TA.Product.Tests.Class1.FactMethodName()
    Finished:    TA.Product.Tests
  === TEST EXECUTION SUMMARY ===
     TA.Product.Tests  Total: 1, Errors: 0, Failed: 1, Skipped: 0, Time: 2.216s
  </pre>
  
  <p>Here's my <code>project.json</code> file:</p>
  
  <pre><code>{
    "version": "1.0.0-*",
    "description": "TA.Product.Tests Class Library",
    "authors": [ "Tim" ],
    "tags": [ "" ],
    "projectUrl": "",
    "licenseUrl": "",
    "dependencies": {
      "TA.Product": "1.0.0-*",
      "xunit": "2.1.0",
      "xunit.runner.dnx": "2.1.0-rc1-build204"
    },
    "commands": {
      "test": "xunit.runner.dnx"
    },
    "frameworks": {
      "dnx451": { },
      "dnxcore50": {
        "dependencies": {
          "Microsoft.CSharp": "4.0.1-beta-23516",
          "System.Collections": "4.0.11-beta-23516",
          "System.Linq": "4.0.1-beta-23516",
          "System.Runtime": "4.0.21-beta-23516",
          "System.Threading": "4.0.11-beta-23516"
        }
      }
    }
  }
  </code></pre>
  
  <p>I found <a href="https://stackoverflow.com/questions/34100464/xunit-in-visual-studio-2015-rc1-update-1-doesnt-find-tests">this question</a>, and my version of the xUnit runner seems to match my DNX version, RC1-Update1.</p>
  
  <p>I also found <a href="https://stackoverflow.com/questions/16214684/why-is-the-xunit-runner-not-finding-my-tests">this question</a> that says my tests must be public, and they are.</p>
  
  <p>An ideas, please?</p>