3
votes

I am currently running VS 2015 Enterprise edition. My global.json file is as follows:

{
  "projects": [ "src"],
  "sdk": {
    "architecture": "x86",
    "runtime": "coreclr",
    "version": "1.0.0-beta6"
  }
}

My test project file uses the following references:

    "xunit": "2.1.0-beta4-*",
    "xunit.runner.dnx": "2.1.0-beta4-*"
  },
  "commands": {
    "test": "xunit.runner.dnx -xml testresults.xml"
  },

Test Explorer does not discover my test files. I am also using Resharper v9.2. It does discover my test files; however, I get an inconclusive message and a message that reads:

Unable to run xUnit.net tests - File not found: {solution path}\artifacts\bin\{Project Name}\{Project Name}.dll.

One additional thing. I am frequently getting a dnx.exe crash when I build my test project.

Any suggestions on how to resolve this problem?

One more thing: I can successfully run the tests from the command prompt / PowerShell using the command dnx . test.

1
I'm seeing the same issue using current beta8 and xunit.dnx using the currently released extension.Jeff Dunlop

1 Answers

1
votes

This was posted before DNX beta8 was released but maybe you used early builds of beta8 or even beta7? I had the same problem with DNX beta8 and it was because the xunit dependencies needed to be updated aswell. You have xunit "2.1.0-beta4-" but if you change it to "2.1.0-" you will get newer versions with support for DNX beta8.

From:

"dependencies": {
    "xunit": "2.1.0-beta4-*",
    "xunit.runner.dnx": "2.1.0-beta4-*",

To:

"dependencies": {
    "xunit": "2.1.0-*",
    "xunit.runner.dnx": "2.1.0-*",

Hope this helps.