Ubuntu 23.10 snapcraft plugin dotnet cannot find build-package 'dotnet-sdk-8.0'

@baldeuniversel On wsl-2 multipass worked with base: core18.

It outputs the same error

Could not find a required package in 'build-packages': dotnet-sdk-8.0

BTW it cannot find event .net-7 in wsl-2 on core 18

Could not find a required package in 'build-packages': dotnet-sdk-7.0

Hi all, my two cents.

Since you’re using core22 as base, build-package will use Ubuntu’s 22.04 sources for apt, which I believe doesn’t include dotnet-sdk-8.0, but does dotnet-sdk-7.0 .

That being said, there’s a mechanism on recent versions of Snapcraft to include custom apt sources. This doc might help things get clearer, I hope.

1 Like

~ @siarhei_kuchuk have you tried this without giving the version .

Like :

build-packages:

- dotnet-sdk

If this not works, @ogra could help you if he has time.

Thanks. Now I understood what 22 means in core. Core is custom Ubuntu and 22 its major version. I checked there’s no 23 version.

1 Like

I already tried it. Error was the same - such package does not exist.

I downgraded to .Net 7 so now I’m able to build snap.

I understand about adding new repositories from Ubuntu 23 to Ubuntu 22 image used for building snap, but i’m not ready to do it since I suppose they are not added by default in Ubuntu 22 for a compatibility reason. And if I do it, I’be solving those issues.

Thanks for your time and efforts to help.

1 Like

Okay ! Well :+1: @siarhei_kuchuk .

Cores are released after LTS Ubuntu releases - 18, 20, 22… We could expect a 24 soon, I guess.

2 Likes

@siarhei_kuchuk Hello, I am one of the .NET package maintainers. I currently work on backporting .NET 8 to Ubuntu 22.04 LTS (Jammy Jellyfish). The review process will take some time until it lands in the archive, but you can expect .NET 8 to be accessible on core22 until the end of this year.

1 Like

I’m happy to hear about coming support of .Net 8.

However there’re more issues with dotnet plugin itself. I posted it Dotnet 7 cannot built on architectures arm64, s390x, ppc64 and elarmhf on Core22 - snapcraft - snapcraft.io and Launching .Net 7 binaries seems is broken - snapcraft - snapcraft.io