Add dotnet7 in Ubuntu 22.04 jammy repository
We are using dotnet6 from official Ubuntu repository, now we need to switch to microsoft repository to install dotnet 7.
Also in the documentation says 6+ (not sure if this is a bug in documentation).

It would be nice if we could install dotnet7 from the official Ubuntu repo.
This is a point in time problem - I think @richlander has more details but we're actively working with Canonical on the packages.
Are there any updates on this issue at the moment?
Canonical has decided that they will offer .NET 7 with 22.10+. It's also work noting that their build of .NET 7 isn't yet ready (for any Ubuntu version).
The instructions for installing .NET 6 (from the official feed) and .NET 7 (from PMC) are currently wrong/misleading. See: https://github.com/dotnet/docs/issues/33539.
Thanks for the info! - do we have any indication on timescales for the build?
Do you have any information that can be shared on if this process is going to be improved for the future (or even if it's going to be moved back to the Microsoft feeds)?
Canonical had to work through one set of processes to get the initial .NET 6 build in place and then another set for .NET side-by-side with their build of .NET 7. It turns out that every dev plat is quite different and so are the rules governing each distro. It is more complicated than it might seem.
I'm hoping that Canonical will have .NET 7 ready this month, but I cannot speak for them.
There is no desire to move folks back to the Microsoft feeds. They are intended to be a fallback, but we intend to continue providing them.
@mirespace
Hi @davidMuir, @miroljub1995 !
As @richlander said (thanks!), we are working alongside Microsoft on bringing the best .NET experience for ubuntu users, so the process of allowing the coexistence of .NET6 and .NET7 had been taken with special care and testing, consuming more time that initially planned. That's the reason about .NET7 availability status in Ubuntu (pending).
Now we can say that we are in the initial phases of releasing .NET7 for our development series (23.04), and then backported (SRU) to Kinetic (22.10). If you're familiar with Canonical's process, the versions will be progressively in the proposed pocket, until we reach universe with the same one as MS is providing at the time of release, as soon as possible.
Sorry for the inconvenience and delay. I will update this thread when the launch has occurred in Kinetic to keep you and all interested people up to date..... thank you!
Hi both, thanks for providing both an update and the additional context behind the delay, that's very helpful!
I look forward to hearing once everything is ready to go!
Hi all!
dotnet7 (7.0.102) package is available now in Kinetic: https://launchpad.net/ubuntu/+source/dotnet7/7.0.102-0ubuntu1~22.10.1 :)
Thank you for your patience.
Just installed it. It looks great! Thanks!
I see it on both x64 and Arm64. Very nice.
My machine now, all via APT:
~$ dotnet --info
.NET SDK:
Version: 7.0.102
Commit: 4bbdd14480
Runtime Environment:
OS Name: ubuntu
OS Version: 22.10
OS Platform: Linux
RID: ubuntu.22.10-x64
Base Path: /usr/lib/dotnet/sdk/7.0.102/
Host:
Version: 7.0.2
Architecture: x64
Commit: d037e070eb
.NET SDKs installed:
6.0.113 [/usr/lib/dotnet/sdk]
7.0.102 [/usr/lib/dotnet/sdk]
.NET runtimes installed:
Microsoft.AspNetCore.App 6.0.13 [/usr/lib/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 7.0.2 [/usr/lib/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 6.0.13 [/usr/lib/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 7.0.2 [/usr/lib/dotnet/shared/Microsoft.NETCore.App]
Will there be container images that build on these packages?
Excellent, thanks for getting this done @mirespace !
@tmds These do: https://hub.docker.com/r/ubuntu/dotnet-aspnet. I don't know what the update cadence is on those.
I am unaware of non-chiseled images being published by Canonical or plans to do so.
I think we can safely close this issue now since .NET 7 has been deployed as Canonical intends, with 22.10+.
@richlander sorry for posting in a closed issue, but do you know if this is also going to be added to jammy repositories at some point? Or is there something about .NET 7 not being an LTS release that would prevent it from going to jammy (which is LTS version of Ubuntu)? Thanks in advance.
Hi @Caleb9 ,
your thoughts were in the right direction: the problem to solve is to support a non-LTS dotnet release (STS) with a support period of 18 months on an Ubuntu LTS series (which has a 10 year lifespan and 5 year standard support).
At Canonical we very much appreciate the interest from the .NET community for .NET 7 in Jammy. This is leading to internal discussions about it but, for the time being, we continue to release only for 22.10+ (Kinetic and onwards).
@mirespace Thanks, that makes sense. I don't mean to even pretend I have any idea about what kind of complications that would create, but just a thought: what if .NET 7 was introduced as a package named dotnet-sdk instead of dotnet-sdk-7.0? It could then be bumped right to .NET 8 (LTS) when that comes out, which afaik is supposed to happen before or at the time of .NET 7 EOL. Well, I guess it's anyway too late now that dotnet-sdk-7.0 is in Kinetic, unless it would imply that dotnet-sdk would be a virtual package pointing to dotnet-sdk-7.0 on Kinetic for now, and a "real" package on Jammy - no idea if that's even doable. Sorry for intruding. :)
That proposal would be a breaking change. The .NET product isn't intended to be upgraded underneath you due to typing some update command. I get the desire, but many people would end up being upset by such a policy. I doubt this model is used for other dev platforms for the same reason.
@mirespace will you provide 'chiseled' container images for .NET 7?
Hi @tmds,
@cjdcordeiro and his team are the magicians of the chiselled container images (congrats team!!). For .NET 7, they have been available since Feb 8th in the following locations:
- ubuntu/dotnet-deps (multi-arch): https://hub.docker.com/r/ubuntu/dotnet-deps/tags?page=1&name=7.0
- ubuntu/dotnet-runtime (amd64 and arm64): https://hub.docker.com/r/ubuntu/dotnet-runtime/tags?page=1&name=7.0
- ubuntu/dotnet-aspnet (amd64 and arm64): https://hub.docker.com/r/ubuntu/dotnet-aspnet/tags?page=1&name=7.0
Also available in ECR (https://gallery.ecr.aws/ubuntu/dotnet-{aspnet,runtime,deps}) and ACR (https://ubuntu.azurecr.io/dotnet-{aspnet,runtime,deps}). And from Microsoft Artifact Registry (MCR).