dotnet / dotnet/sdk

NuGet restore fails with NU1101 for arch-x64 RID: Microsoft.NETCore.App.Host.arch-x64 not found

Open
#52,393 2 comments 5 reactions 0 assignees View on GitHub
Area-NetSDK untriaged
Dominant language
C#
Stars
3.2k
Forks
1.3k
PR merge metrics
PR metrics pending

Description

### Describe the bug

On Arch Linux-based distributions (Arch, CachyOS, Manjaro, etc.), `dotnet restore` and `dotnet build` fail because NuGet cannot find packages for the `arch-x64` Runtime Identifier (RID), even though this RID is officially defined in the SDK's RuntimeIdentifierGraph.json.
To Reproduce
**System:** CachyOS Linux (Arch-based)
**SDK Version:** 10.0.101

1. Create any .NET project: `dotnet new console`
2. Attempt to build: `dotnet build`
Error Output
error NU1101: Unable to find package Microsoft.NETCore.App.Host.arch-x64. No packages exist with this id in source(s): nuget.org

## Root Cause Analysis

The SDK correctly identifies the system as `arch-x64`:

- `/usr/share/dotnet/sdk/10.0.100/Microsoft.NETCoreSdk.BundledVersions.props` line 28:
```xml
arch-x64
linux-x64
```
- /usr/share/dotnet/sdk/10.0.100/RuntimeIdentifierGraph.json contains:
arch-x64: {
#import: [ arch, linux-x64 ]
}
- arch-x64 is included in the official AppHostRuntimeIdentifiers list in BundledVersions.props
However: NuGet restore does not follow the RID fallback chain from arch-x64 → linux-x64, and packages are not published with arch-x64 variants on NuGet.org.
Expected behavior
NuGet should automatically fall back from arch-x64 to linux-x64 during package restoration, as defined in the RID graph's #import directive.
Actual behavior
NuGet looks for Microsoft.NETCore.App.Host.arch-x64 specifically and fails, despite the fallback being defined.
Environment
.NET SDK:
Version: 10.0.100
Commit: b0f34d51fc
Runtime Environment:
OS Name: cachyos
OS Platform: Linux
RID: arch-x64

dotnet --info shows RID as: arch-x64
Workaround
Manually override the RID in the project file or build properties:

linux-x64

Impact
This affects all Arch Linux users (Arch, Manjaro, CachyOS, EndeavourOS, etc.) on .NET 10.0, making it impossible to build projects without workarounds.
Related Issues

- #52058 - Similar Prune Package data issue on Arch Linux with .NET 10
- #17333 - Same issue reported in .NET 5 (closed without resolution)
Notes
This appears to be a regression or incomplete implementation where:

1. The SDK properly defines and detects arch-x64 as a valid RID
2. The RID graph correctly maps the fallback to linux-x64
3. But NuGet restore logic doesn't honor the fallback chain during package resolution

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.