如果 dnx 版本 > 到 451,为什么 xUnit 测试在测试资源管理器中不可见?

Why does xUnit tests are not visible in Test Explorer if dnx version is > to 451?

我们做了一个全新的项目,我们想使用 xUnit 作为单元测试。但是,我们希望以 .net 4.6.0 和 .net core 1.0 为目标。

我们所有 project.json 中的所有项目都在 net460 中。据我所知,为了与 xUnit 兼容,我们需要在 dnx451 中有我们的测试项目。这是我们遇到问题的地方,因为我们至少以 460 为目标 ...

当我们在 xUnit project.json 中更改为 dnx460 时,测试在测试资源管理器中不可见...?有什么理由吗?我们是不是搞错了什么地方?

我们使用VS2015。

这是我们的 project.json

{
  "version": "1.0.0-*",
  "description": "SESAMEngineFacturation.Tests Class Library",
  "authors": [ "christophe.mom" ],
  "tags": [ "" ],
  "projectUrl": "",
  "licenseUrl": "",
  "commands": {
    "test": "xunit.runner.dnx"
  },
  "dependencies": {
    "SESAMEngineFacturation": "",
    "xunit": "2.1.0",
    "xunit.runner.dnx": "2.1.0-*",
    "FluentAssertions": "4.2.2"
  },
  "frameworks": {
    "dnx451": { }
  }
}

根据这个 GitHub 问题:https://github.com/xunit/xunit/issues/600 我想我们必须等待 ASP.NET 核心 RC2 出来才能让 dnx460 支持 xunit.runner还有 VSTests 和 Resharper 单元测试资源管理器。