dotnet / dotnet/sdk

Cross compilation on Ubuntu 22.04 to ARM from AMD

Open
#45,208 5 comments 2 reactions 1 assignee Claimed by @marcpopMSFT View on GitHub
Area-Linux
Dominant language
C#
Stars
3.2k
Forks
1.3k
PR merge metrics
PR metrics pending

Description

In dotnet9 is cross compilation still supported on Ubuntu? What is required?

**Steps to reproduce**

1. I have installed dotnet9
1. I have run script from documentation:
https://learn.microsoft.com/en-us/dotnet/core/deploying/native-aot/cross-compile#linux
1. Created new webapiaot
`dotnet new webapiaot`
1. Run publish
`dotnet publish -f net9.0 -r linux-arm64 -c Release`

Exception:
error : The PrivateSdkAssemblies ItemGroup is required for _ComputeAssembliesToCompileToNative

**Real scenario**

In our production we have used a docker container for cross compiling.

Following script is incompatible with latest docker images (9.0-noble) and there is no documentation provided how to enable cross compilation on that image.

I have also tried directly to use the 9.0-noble-arm container ... but I get an exception wheb executing dotnet publish.

`sudo dpkg --add-architecture arm64
sudo bash -c 'cat > /etc/apt/sources.list.d/arm64.list <

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.