-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Closed
Labels
Milestone
Description
Reported by @lemonmojo in #73678 (comment):
I'm also running into the same error using .NET 8 Preview 1.
While cross-compiling to x64 from an M1 machine works fine for me, I can't get the reverse (cross-compiling to ARM64 from an Intel machine) to work.
I'm not using any packages in this project. In fact, the issue is very easy to reproduce:
dotnet new classlib -n "AOTTest"
cd AOTTest
dotnet publish -p "PublishAot=true" -r osx-x64
dotnet publish -p "PublishAot=true" -r osx-arm64
Publishing using dotnet publish -r osx-x64 and dotnet publish -r osx-arm64 works fine from an M1 machine.
While on an Intel machine only the x64 build works and the ARM64 one fails with the error message:
/Users/redacted/.nuget/packages/microsoft.dotnet.ilcompiler/8.0.0-preview.1.23110.8/build/Microsoft.NETCore.Native.Publish.targets(74,5): error : The PrivateSdkAssemblies ItemGroup is required for _ComputeAssembliesToCompileToNative [/Path/to/Project.csproj].
So here's what works and what doesn't work in my testing:
ARM64 -> x64: OK
ARM64 -> ARM64: OK
x64 -> x64: OK
x64 -> ARM64: Error