-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Cannot install maui-android workload on Ubuntu 24.04 in Docker #41123
Comments
Hi I'm an AI powered bot that finds similar issues based off the issue title. Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you! Closed similar issues:
|
@jonathanpeppers Is there a maui-android workload for Linux? |
There is for jammy. We are using 22.04 right now and it can be installed without any issue. |
@klemmchr you're using the distro-built SDKs, not the MS-provided SDKs, right? In that case you're hitting dotnet/source-build#3242. We're working with the MAUI teams to make their workloads compatible with the Source-Built SDKs (which the distros use) but for now there's not really a great workaround that doesn't involve mucking around in your SDK install. Please follow that issue for updates. |
An alternative is to install the Microsoft build of the SDK manually from the .tar.gz as detailed in https://learn.microsoft.com/en-us/dotnet/core/install/linux-scripted-manual#manual-install |
@baronfel I can reproduce this issue using the MS-provided SDKs. This is a sample Dockerfile for jammy (working): FROM ubuntu:jammy
ENV \
# UID of the non-root user 'app'
APP_UID=1654 \
# Configure web servers to bind to port 8080 when present
ASPNETCORE_HTTP_PORTS=8080 \
# Enable detection of running in a container
DOTNET_RUNNING_IN_CONTAINER=true \
# Add global tools to path
PATH=/root/.dotnet/tools:$PATH \
# Do not generate dev certificates
DOTNET_GENERATE_ASPNET_CERTIFICATE=false \
# Do not show first run text
DOTNET_NOLOGO=true \
# Use polling file watcher
DOTNET_USE_POLLING_FILE_WATCHER=true
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive \
apt-get install -y --no-install-recommends \
ca-certificates \
wget \
libatomic1 \
libc6 \
libgcc-s1 \
libgssapi-krb5-2 \
libicu70 \
liblttng-ust1 \
libssl3 \
libstdc++6 \
libunwind8 \
tzdata \
zlib1g \
&& rm -rf /var/lib/apt/lists/*
RUN wget https://packages.microsoft.com/config/ubuntu/22.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb && \
dpkg -i packages-microsoft-prod.deb && \
rm packages-microsoft-prod.deb && \
apt update && \
apt install -y dotnet-sdk-8.0 && \
rm -rf /var/lib/apt/lists/*
RUN dotnet workload install maui-android This is a sample Dockerfile for noble (not working): FROM ubuntu:noble
ENV \
# UID of the non-root user 'app'
APP_UID=1654 \
# Configure web servers to bind to port 8080 when present
ASPNETCORE_HTTP_PORTS=8080 \
# Enable detection of running in a container
DOTNET_RUNNING_IN_CONTAINER=true \
# Add global tools to path
PATH=/root/.dotnet/tools:$PATH \
# Do not generate dev certificates
DOTNET_GENERATE_ASPNET_CERTIFICATE=false \
# Do not show first run text
DOTNET_NOLOGO=true \
# Use polling file watcher
DOTNET_USE_POLLING_FILE_WATCHER=true
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive \
apt-get install -y --no-install-recommends \
ca-certificates \
wget \
libc6 \
libgcc-s1 \
libicu74 \
liblttng-ust1 \
libssl3 \
libstdc++6 \
libunwind8 \
tzdata \
zlib1g \
&& rm -rf /var/lib/apt/lists/*
RUN wget https://packages.microsoft.com/config/ubuntu/24.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb && \
dpkg -i packages-microsoft-prod.deb && \
rm packages-microsoft-prod.deb && \
apt update && \
apt install -y dotnet-sdk-8.0 && \
rm -rf /var/lib/apt/lists/*
RUN dotnet workload install maui-android I cannot say for sure that the MS-provided SDKs are even installed on noble. According to the docs there is no Microsoft feed for noble. Installing .NET via manual install is not an option to me. I need a solution where the latest SDK gets installed automatically without manual configuration from my side. |
Correct, the packages.microsoft.com repo for Ubuntu 24.04 doesn't contain 8.0 SDKs so you're installing from Ubuntu's repo: https://packages.microsoft.com/ubuntu/24.04/prod/pool/main/d/
You could use the dotnet-install.sh script which handles installing the latest version: https://learn.microsoft.com/en-us/dotnet/core/install/linux-scripted-manual#scripted-install |
Why is Microsoft not publishing the 8.0 SDKs in their repo, especially when the distro-build SDKs are not suited for installing certain workloads?
Using magic install scripts in Dockerfiles is heavily discouraged since it poses a security risk and makes the installation intransparent. |
There's more background in dotnet/core#9258. I wasn't involved in the discussions so I'm not sure people were aware of the MAUI workloads limitation.
You can read the source of the script, it essentially downloads and unpacks the .tar.gz, which is why I suggested the manual install 😄 But anyway this was meant to give a workaround, the real fix is putting the workload manifests into source-built SDKs: dotnet/source-build#3242 |
first write the command |
Description
I try to install the
maui-android
workload on Ubuntu 24.04 in Docker. The installation fails because the workload could not be found. Installing other workloads (likewasm-tools
) works without any error.Console output
Steps to Reproduce
Use Dockerfile from above and build it
Link to public reproduction project repository
No response
Version with bug
Unknown/Other
Is this a regression from previous behavior?
No, this is something new
Last version that worked well
Unknown/Other
Affected platforms
Other (Tizen, Linux, etc. not supported by Microsoft directly)
Affected platform versions
No response
Did you find any workaround?
No response
Relevant log output
No response
The text was updated successfully, but these errors were encountered: