runner-images icon indicating copy to clipboard operation
runner-images copied to clipboard

Nuget is not available on Ubuntu 24.04

Open ThibaultLesuisse opened this issue 1 year ago • 5 comments

Description

Currently Ubuntu is not present in the 24.04 Ubuntu deb repo's. Is there an alternative like using the 22.04 repo's?

Platforms affected

  • [X] Azure DevOps
  • [ ] GitHub Actions - Standard Runners
  • [ ] GitHub Actions - Larger Runners

Runner images affected

  • [ ] Ubuntu 20.04
  • [ ] Ubuntu 22.04
  • [X] Ubuntu 24.04
  • [ ] macOS 12
  • [ ] macOS 13
  • [ ] macOS 13 Arm64
  • [ ] macOS 14
  • [ ] macOS 14 Arm64
  • [ ] Windows Server 2019
  • [ ] Windows Server 2022

Image version and build link

Custom image build

Is it regression?

Yes

Expected behavior

Nuget to be present

Actual behavior

Nuget is not present on ubuntu 24.04:

azure-arm.build_image: E: Package 'nuget' has no installation candidate

Repro steps

  1. Run the 24.04 packr install script.
  2. Investigate the build output

ThibaultLesuisse avatar Sep 17 '24 08:09 ThibaultLesuisse

Thank you for bringing this issue to us. We are looking into this issue and will update you on this issue after investigating.

kishorekumar-anchala avatar Sep 17 '24 08:09 kishorekumar-anchala

Hi @ThibaultLesuisse- For the above issue, I am providing you workaround step:-

You can use the 22.04 Repository (Workaround) If you still prefer to use the Ubuntu repositories, you can temporarily use the 22.04 repositories.

  • You can try adding the 22.04 repository to your sources list: sudo sh -c 'echo "deb http://archive.ubuntu.com/ubuntu jammy main universe" > /etc/apt/sources.list.d/jammy.list'

  • Also you can once try to Update and install NuGet by using below command.

sudo apt-get update sudo apt-get install nuget

Please Let me know if you need further assistance after trying above steps!

Prabhatkumar59 avatar Sep 20 '24 10:09 Prabhatkumar59

Won't this add 22.04 packages? This could have some consequences right?

ThibaultLesuisse avatar Sep 25 '24 10:09 ThibaultLesuisse

Hi @ThibaultLesuisse - we will check on this and will update you shortly. Thanks!

Prabhatkumar59 avatar Sep 25 '24 13:09 Prabhatkumar59

Hi @ThibaultLesuisse - You can use ubuntu 22.04 as a workaround and log/create a 'feature request' to add Nuget to ubuntu 24.04 image.

Prabhatkumar59 avatar Sep 26 '24 13:09 Prabhatkumar59

Hi @ThibaultLesuisse - You can create a 'feature request' to add Nuget to ubuntu 24.04 image. Since we haven't heard back, we will close this issue for now. Feel free to reach out to us for any other queries. Thanks.


Prabhatkumar59 avatar Oct 04 '24 16:10 Prabhatkumar59

I tried this workaround because I need to pack a nuget package using a nuspec file which doesn't seem to be supported by DotNetCoreCLI@2 (https://github.com/microsoft/azure-pipelines-tasks/issues/20903)

This workaround resulted in the following error when using NuGetCommand@2

Could not load file or assembly 'System.Net.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies.

Also installing mono-complete resolved this:

sudo sh -c 'echo "deb http://archive.ubuntu.com/ubuntu jammy main universe" > /etc/apt/sources.list.d/jammy.list'
sudo apt-get update
sudo apt-get install mono-complete
sudo apt-get install nuget

Hopefully DotNetCoreCLI@2 will be updated or Nuget will be added to Ubuntu 24.04.

sclarke81 avatar May 23 '25 15:05 sclarke81

@Prabhatkumar59 & @sclarke81

Your solutions worked! Thank you for this

francisaguilar21 avatar Jun 16 '25 02:06 francisaguilar21