-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Description
Describe the bug
Running 'app.cs'-style single-file-apps on Fedora fails with an exception, because dotnet searches for the nuget package runtime.fedora.43-x64.Microsoft.DotNet.ILCompiler instead of runtime.linux-x64.Microsoft.DotNet.ILCompiler.
To Reproduce
I found it easiest to reproduce it by building this docker image:
FROM fedora:43
RUN dnf install -y dotnet-sdk-10.0
WORKDIR /app
RUN echo "Console.WriteLine(\"Hello, World!\");" > app.cs
RUN dotnet run /app/app.cs
I tested it with fedora:43 and fedora:42. Running the equivalent with debian:13 works without a problem:
FROM debian:13
RUN apt update && apt install -y wget
RUN wget https://packages.microsoft.com/config/debian/13/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
RUN dpkg -i packages-microsoft-prod.deb
RUN rm packages-microsoft-prod.deb
RUN apt-get update && \
apt-get install -y dotnet-sdk-10.0
WORKDIR /app
RUN echo "Console.WriteLine(\"Hello, World!\");" > app.cs
RUN dotnet run /app/app.cs
Exceptions (if any)
error NU1101: Unable to find package runtime.fedora.43-x64.Microsoft.DotNet.ILCompiler. No packages exist with this id in source(s): /usr/lib64/dotnet/library-packs, nuget.org
Further technical details
details of dotnet --info
.NET SDK: Version: 10.0.101 Commit: fad253f51b Workload version: 10.0.100-manifests.1773493e MSBuild version: 18.0.6+fad253f51
Runtime Environment:
OS Name: fedora
OS Version: 43
OS Platform: Linux
RID: fedora.43-x64
Base Path: /usr/lib64/dotnet/sdk/10.0.101/
.NET workloads installed:
There are no installed workloads to display.
Configured to use workload sets when installing new manifests.
No workload sets are installed. Run "dotnet workload restore" to install a workload set.
Host:
Version: 10.0.1
Architecture: x64
Commit: fad253f51b
.NET SDKs installed:
10.0.101 [/usr/lib64/dotnet/sdk]
.NET runtimes installed:
Microsoft.AspNetCore.App 10.0.1 [/usr/lib64/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 10.0.1 [/usr/lib64/dotnet/shared/Microsoft.NETCore.App]
Other architectures found:
None
Environment variables:
Not set
global.json file:
Not found
Learn more:
https://aka.ms/dotnet/info
Download .NET:
https://aka.ms/dotnet/download