.NET Packages for Ubuntu 24.04 #9258
Replies: 4 comments 21 replies
-
Hi! Any updates on the issue? dotnet is still missing in packages.microsoft.com/ubuntu/24.04
|
Beta Was this translation helpful? Give feedback.
-
This decision has some implications. Currently not all workloads are supported for distro build SDK versions. This is especially true for MAUI workloads, the progress on that is tracked in dotnet/source-build#3242 As a result it is impossible to build MAUI application on any distro where only the distro build SDK versions are supported. The only workaround is to install .NET manually using the installer script or by downloading manually. It will also occur on distros where Microsoft still publishes the SDK using the Microsoft feed if you choose to use the recommended and most convenient installation method of using distro provided SDKs. A full description of this issue can be found in dotnet/sdk#41123 This behavior is not documented anywhere. Furthermore, you will be presented with an error that is completely intransparent about this limitation
I see two options to mitigate this issue:
The issue has no progress for almost a year now. There are other users having the same problem:
According to dotnet/source-build#3242 (comment) this does also affect android and macos workloads, apart from the MAUI workloads. |
Beta Was this translation helpful? Give feedback.
-
This has led to an unfortunate situation where This might not be so bad (installing manually is annoying but not the end of the world) except that you get a pretty vague error without a clear resolution:
It'd help a lot if the SDK printed a more helpful error message here at the very least. It would also be nice if there was a notice added to the Ubuntu installation documentation stating that Microsoft no longer provides packages starting with Ubuntu 24.04 (maybe with a link to this issue.) It's mentioned elsewhere on that page but it's easy to miss. |
Beta Was this translation helpful? Give feedback.
-
I just upgraded to Ubuntu 24.04 and all my stuff stopped working. After much invstigation I realised that my code was expecting SDK 8.0.401 (released a month and a half ago), but the package manager only offers 8.0.108. So although the problem that led to this decision is real and understandable, the solution is not ideal. The Ubuntu package repo is notorious (for good reason) for having older versions. I generally like that, but not for work-related packages (i.e. coding tools), for which I want the latest bugfixes. |
Beta Was this translation helpful? Give feedback.
-
The release of Ubuntu 24.04 is just around the corner. Canonical-produced .NET 6, 7, and 8 packages will be available on day one, for "Noble Numbat". Microsoft will not be publishing .NET packages to the
24.04
feed atpackages.microsoft.com
.Context
We have been working closely with Canonical on .NET packages in Ubuntu for a few years now. We announced .NET 6 in Ubuntu 22.04 almost two years ago. The Canonical packages are kept up to date and compiled from upstream source.
The initial rollout of .NET 6 in Ubuntu was unexpectedly challenging. We didn't realize the degree to which packages from two publishers with the same package names would conflict. In retrospect, this should have been obvious and we should have done a better job preparing the community.
Sadly, this problem repeated itself when Canonical published .NET 8 packages after Microsoft packages were already available.
Dual-publishing packages like this is inherently challenging. In any case, we're not doing it well, and we have not identified an approach that we think would make it work a lot better.
One of the challenges is that
packages.microsoft.com
is a generic service (for Microsoft). For example, the22.04
feed contains multiple products. Users that want to register the feed to acquire one Microsoft product are registered for all products on that feed. However, a correctly working .NET installation can get damaged due to registering the Microsoft feed to install PowerShell, for example.Policy
We are very appreciative that .NET is now built and included by multiple Linux distributions. A lot of collective effort has gone into dotnet/dotnet and dotnet/source-build repos. The fact that multiple distros now rely on and contribute to these "source build" efforts is evidence of a certain level of acceptance in these distro communities. We're very thankful for that.
We've decided on the following policy:
Implications for Ubuntu users
For many users, this policy won't change much. .NET will be available in Ubuntu and many users will just install and use it. In the past, .NET versions were (somewhat) slow to show up in the Ubuntu archive. We expect that new versions will show up more quickly at this point. The fact that .NET versions will be available for Ubuntu 24.04 on day one is evidence of that.
For other users, this will be more of a challenge.
The first challenge is that the SDK has a concept of feature bands. Most distros, including Ubuntu, stick to the
.1xx
feature band for the lifetime of a major .NET version. They make this choice because.1xx
is (effectively) the "compatibility band". Higher bands can have breaking changes.This means there will no longer be packages available for
.2xx
and later feature bands. Such packages have been exclusively available from Microsoft.This situation is primarily a problem for users who write code in Visual Studio (which install the later feature bands) on Windows and then build their code on Linux (with a
.1xx
feature band SDK).If users see an incompatibility between
.1xx
and higher feature bands, we ask that you please report it in the dotnet/sdk repo.Note: The feature band concept is an unfortuante complexity. It was invented due to Visual Studio and the .NET SDK shipping a few of the same components (Roslyn, MSbuild, NuGet) and Visual Studio having a different compatibility bar. We would prefer not to have feature bands, but have been unable to satisfy product and compatibility needs otherwise.
Separately, some users may prefer Microsoft-built binaries. We're not in a position to tell users who to trust. However, it should be noted that Microsoft gives Canonical CVE (source) patches ahead of embargo so that they can publish patched binaries to Ubuntu feeds at the same time as Microsoft.
Users that require higher feature bands or Microsoft-built binaries can install them via the install script or download
.tar.gz
archives. The containers we publish also include the highest feature band.Snap package
Canonical is in the process of taking over the Snap package from Microsoft. It will switch to installing Canonical-built .NET packages.
Commitment to Ubuntu
Microsoft is committed to Ubuntu being a first-class environment for .NET developers and users. Canonical and Microsoft continue to work closely together towards that goal.
For example, we recently announced Chiseled containers as a joint project.
Improve Debian packages
We've been talking about what to invest in next. Debian (upstream of Ubuntu) does not have .NET packages. We will continue producing Debian x64 packages (per our policy) and are considering also producing Arm64 packages.
Beta Was this translation helpful? Give feedback.
All reactions