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

base: core22

confinement: classic
compression: lzo

architectures:
  - build-on: [amd64]
    build-for: [all]

Try with the … :

base: core18

Seems like I’m unable to check with core18. Multipass writes that virtualization have to be enabled. When I enable it on my Ubuntu virtual machine, VmWare says that host does not support it.

I also tried to use dump plugin with prebuilt binaries, but it also does not work. It writes that it verifies dlls and unable to recognize them. And on Windows it does not do this check and produces .snap file. But on Windows it still can’t find .net-8 as stage-packages packages…

Do you know if devs of snapcraft have bug tracker or something. If they add support for .Net 8, i’ll just wait, if not - ill be considering downgrade to .Net 7.

Are you sure that the virtualization is enabled in your BIOS/UEFI ?

Yes, I use it to run docker and wsl-2. And sorry for taking so many of your time.

Okay ! @siarhei_kuchuk

I think you can enable core18 if you execute these commands before :

multipass delete --all

multipass purge

Make sure you have a backup before executing these commands.

You can even try this command before executing the above commands :

multipass launch core18

I did not try, but I think this command allows to switch the core(s).

multipass launch core18

I tried launch after this

multipass launch core18

and this

multipass delete --all
multipass purge

It writes

launch failed: KVM support is not enabled on this machine. Please ensure the following:
1.	The system’s CPU supports virtualization.
2.	Virtualization is enabled in the system BIOS.
3.	The KVM kernel modules are loaded.

Ill try in the evening to do it on wsl-2 and write resutls. Probably inside wsl-2 it will recognize virtualization.

Okay ! @siarhei_kuchuk

If the bug persists, I will invite @ogra to help you.

@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