Skip to content
This repository has been archived by the owner on Nov 1, 2020. It is now read-only.

HelloWorld Sample is broken. #6282

Open
BrainSlugs83 opened this issue Aug 31, 2018 · 2 comments
Open

HelloWorld Sample is broken. #6282

BrainSlugs83 opened this issue Aug 31, 2018 · 2 comments

Comments

@BrainSlugs83
Copy link

On a fresh machine, with .NET Core 2.1.401, following the hello world guide at: https://github.com/dotnet/corert/tree/master/samples/HelloWorld

It fails when executing the dotnet publish -r win-x64 -c release command, during the "Generating native code" step:

  Generating native code
libcpmt.lib(nothrow.obj) : fatal error LNK1112: module machine type 'x86' conflicts with target machine type 'x64' [d:\Projects.temp\CoreRT-HelloWorld\CoreRT-HelloWorld.csproj]
C:\Users\Mikey\.nuget\packages\microsoft.dotnet.ilcompiler\1.0.0-alpha-26831-02\build\Microsoft.NETCore.Native.targets(247,5): error MSB3073: The command "link  @"obj\release\netcoreapp2.1\win-x64\native\link.rsp"" exited with code 1112. [d:\Projects.temp\CoreRT-HelloWorld\CoreRT-HelloWorld.csproj]
@jkotas
Copy link
Member

jkotas commented Aug 31, 2018

This is caused by running in x86 Native Tools Command Prompt. Try running in vanilla command prompt or x64 Native Tools Command Prompt.

We have this error mentioned in https://github.com/dotnet/corert/blob/master/Documentation/how-to-build-and-run-ilcompiler-in-console-shell-prompt.md#workarounds-for-build-errors-on-windows. Maybe we need to make it more discoverable.

@noahfalk
Copy link
Member

Maybe we need to make it more discoverable.

Yep I just hit the same problem. However thumbs up for opening this issue which let me solve the problem quickly : )

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants