-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Closed
Description
NativeAOT allows x-architecture publishing for the same platform as an advanced user scenario. The error message when the user hasn't setup the environment correctly should be improved.
Repro (terminal window on a win-x64 machine with the required pre-requisites installed)
dotnet new console
dotnet publish /p:PublishAot=true -c Release -r win-arm64
Output
Generating compatible native code. To optimize for size or speed, visit https://aka.ms/OptimizeNativeAOT
LINK : error LNK2001: unresolved external symbol wmainCRTStartup [test\test.csproj]
test.obj : error LNK2001: unresolved external symbol RhpInitialDynamicInterfaceDispatch [test\test.csproj]
test.obj : error LNK2001: unresolved external symbol RhpNewArray [test\test.csproj]
test.obj : error LNK2001: unresolved external symbol RhpAssignRefArm64 [test\test.csproj]
...
.nuget\packages\runtime.win-x64.microsoft.dotnet.ilcompiler\7.0.0-preview.6.22321.8\sdk\bootstrapper.lib : warning LNK4272: library machine type 'x64' conflicts with target machine type 'ARM64' [test\test.csp
roj]
.nuget\packages\runtime.win-x64.microsoft.dotnet.ilcompiler\7.0.0-preview.6.22321.8\sdk\Runtime.WorkstationGC.lib : warning LNK4272: library machine type 'x64' conflicts with target machine type 'ARM64' [test\test.csproj]
.nuget\packages\runtime.win-x64.microsoft.dotnet.ilcompiler\7.0.0-preview.6.22321.8\sdk\System.Globalization.Native.Aot.lib : warning LNK4272: library machine type 'x64' conflicts with target machine type 'ARM64' [test\test.csproj]
.nuget\packages\runtime.win-x64.microsoft.dotnet.ilcompiler\7.0.0-preview.6.22321.8\sdk\System.IO.Compression.Native.Aot.lib : warning LNK4272: library machine type 'x64' conflicts with target machine type 'ARM64' [test\test.csproj]
bin\Release\net7.0\win-arm64\native\test.exe : fatal error LNK1120: 130 unresolved externals [test\test.csproj]
cli\sdk\7.0.100-preview.7.22323.2\Sdks\Microsoft.DotNet.ILCompiler\build\Microsoft.NETCore.Native.targets(342,5): error MSB3073: The command ""C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\bin\Hostx64\arm64\link
.exe" @"obj\Release\net7.0\win-arm64\native\link.rsp"" exited with code 1120. [test\test.csproj]
Metadata
Metadata
Assignees
Type
Projects
Status
No status