1
votes

My tests are not visible in visual studio 2015 with DNX46 (Test > Windows > Test Explorer)

I can run them from the console (with dnx test). Bellow the project.json of my test project

{
  "version": "1.0.0-*",
  "description": "project Class Library",
  "authors": [ "me" ],
  "tags": [ "" ],
  "projectUrl": "",
  "licenseUrl": "",
  "frameworks": {
    "dnx46": { }
  },
  "commands": {
    "test": "xunit.runner.dnx"
  },
  "dependencies": {
    "Microsoft.AspNet.TestHost": "1.0.0-rc1-final",
    "NSubstitute": "1.9.2",
    "Search": "1.0.0-*",
    "Search.Infrastructure": "1.0.0-*",
    "Search.Model": "1.0.0-*",
    "Swagger.Net.UI": "1.1.0",
    "xunit": "2.1.0",
    "xunit.runner.dnx": "2.1.0-rc1-build204"
  }
}

I tried to install SideWaffle, maybe something was missing in my project, but same issue.

1
What DNX version do you use? - Victor Hurdugaci
Not that :) Run "dnx --version" - Victor Hurdugaci
Oh ok I tried with the final and 1.0.0-rc2-16249 (this the current used version) - rad
Have you updated ASP.NET tooling to RC1? - Pawel
Yep I executed AspNet5.ENU.RC1_Update1.exe this is what you mean ? - rad

1 Answers

0
votes

Humm the solution was to put the command after the dependencies declaration in project.json

{
  "version": "1.0.0-*",
  "description": "project Class Library",
  "authors": [ "me" ],
  "tags": [ "" ],
  "projectUrl": "",
  "licenseUrl": "",
  "frameworks": {
    "dnx46": { }
  },
  "dependencies": {
    "Microsoft.AspNet.TestHost": "1.0.0-rc1-final",
    "NSubstitute": "1.9.2",
    "Search": "1.0.0-*",
    "Search.Infrastructure": "1.0.0-*",
    "Search.Model": "1.0.0-*",
    "Swagger.Net.UI": "1.1.0",
    "xunit": "2.1.0",
    "xunit.runner.dnx": "2.1.0-rc1-build204"
  },
  "commands": {
    "test": "xunit.runner.dnx"
  }
}