jcansdale / TestDriven.Net-Issues

Issue tracking for TestDriven.Net
https://github.com/jcansdale/TestDriven.Net-Issues/issues
24 stars 2 forks source link

Testing .NET Core project might fail with: "MyTests.exe isn't a .NET assembly" #63

Closed jcansdale closed 7 years ago

jcansdale commented 7 years ago

NOTE: When a "runtimes" element was defined in a .NET Core project, it was attempting to execute the native EXE shim rather than the target assembly DLL.

I'm seeing this error from a project like this:

{
  "version": "1.0.0-*",
  "buildOptions": {
    "emitEntryPoint": true
  },

  "runtimes": { "win10-x64": "" },

  "dependencies": {
    "dotnet-test-xunit": "2.2.0-preview2-build1029",
    "Microsoft.NETCore.App": "1.0.0",
    "StaticMocks": "0.8.0-beta-506",
    "xunit": "2.2.0-beta3-build3402"
  },

  "testRunner": "xunit",

  "frameworks": {
    "netcoreapp1.0": {
      "imports": "dnxcore50"
    }
  }
}

It appears that both of these files exist:

bin\Debug\netcoreapp1.0\win10-x64\ConsoleApp1.exe
bin\Debug\netcoreapp1.0\win10-x64\ConsoleApp1.dll

I expect the first one is a non-.NET shim EXE for bootstrapping .NET Core.