-
Notifications
You must be signed in to change notification settings - Fork 6.1k
Description
Type of issue
Other (describe below)
Description
Describe the issue or suggestion
Hi,
I recently had a rather difficult experience upgrading to .NET 10 on Ubuntu 24.04, and I thought I would share my experience in the hope that it could help others, and perhaps some documentation could be updated.
Backround
Somewhere in 2023 I was installing .NET 7 on my Ubuntu instance, and back at that time I believe the "officially endorsed" approach was to use the Microsoft package feed, and to ignore the packages published by canonical.
The documentation is still present today which recommends this:
https://github.com/dotnet/docs/blob/main/docs/core/install/linux-package-mixup.md#i-need-a-version-of-net-that-isnt-provided-by-my-linux-distribution
It recommends adding the following to /etc/apt/preferences:
Package: dotnet* aspnet* netstandard*
Pin: origin "archive.ubuntu.com"
Pin-Priority: -10
Three Years Later
Now 2026, I came to install .NET 10. The Microsoft Feed is no longer supported, and users are expected to use the packages published by canonical. The preferences that I had set three years prior made this very difficult.
The error I was getting was: E: Package dotnet-sdk-10.0 has no installation candidate
I had long since forgotten that I had blocked the canonical packages, and had to go through a significant amount of package manager debugging before I eventually rediscovered the erroneous /etc/apt/preferences that had been set previously.
I discovered this after running apt-cache policy and noticing that many dotnet packages were included under the "Pinned packages" section.
After removing the offending section from /etc/apt/preferences, I was able to install the package without issue.
Documentation Improvements
Perhaps on this page: https://learn.microsoft.com/en-us/dotnet/core/install/linux-ubuntu-install?tabs=dotnet10&pivots=os-linux-ubuntu-2404
A warning/note should be added that Microsoft has historically recommended blocking/disabling canonical packages, and that anyone who still has the configuration may encounter issues.
Page URL
https://learn.microsoft.com/en-us/dotnet/core/install/linux-ubuntu-install
Content source URL
https://github.com/dotnet/docs/blob/live/docs/core/install/linux-ubuntu-install.md
Document Version Independent Id
e7286112-86cf-8d6a-655b-ee851f396d15
Article author
adegeo
Metadata
- ID: 72799d86-e122-1706-18a2-d0bfde699bfc
- Service: dotnet-fundamentals
- Sub-service: install