Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
jcansdale opened this issue Oct 14, 2016 · 0 comments
Assignees
Labels
Milestone

Comments

@jcansdale
Copy link
Owner

jcansdale commented Oct 14, 2016

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.

@jcansdale jcansdale added the bug label Oct 14, 2016
@jcansdale jcansdale added this to the v4.0-beta2 milestone Oct 14, 2016
@jcansdale jcansdale self-assigned this Oct 14, 2016
@jcansdale jcansdale changed the title ConsoleApp1.exe isn't a .NET assembly. MyTests.exe isn't a .NET assembly. Oct 14, 2016
@jcansdale jcansdale changed the title MyTests.exe isn't a .NET assembly. MyTests.exe isn't a .NET assembly Oct 14, 2016
@jcansdale jcansdale changed the title MyTests.exe isn't a .NET assembly MyTests.exe isn't a .NET assembly (.NET Core) Oct 14, 2016
@jcansdale jcansdale changed the title MyTests.exe isn't a .NET assembly (.NET Core) Testing .NET Core project might fail with: "MyTests.exe isn't a .NET assembly" Oct 14, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant