Unable to correct problems, you have held broken packages. dotnet-sdk-6.0 : Depends: aspnetcore-targeting-pack-6.0 (>= 6.0.18) but it is not going to be installed.

RamanaReddy V
2 min readJul 5, 2023

Issue:

We encountered an error while attempting to install .NET SDK 6 as part of Azure ADO Build Pipelines.

ADO Pipeline Error

Resolution :

I encountered an issue while trying to install Microsoft’s Linux Software Repository related packages. The issue arose because my build agents are running Ubuntu 20.04 OS version, but I attempted to pull packages meant for Ubuntu 18.04.

Before upgrading the classic ADO pipeline

To resolve the aforementioned issue, I upgraded the version of Microsoft’s Linux Software Repository related packages from 18.04 to 20.04, in accordance with the OS version of the ADO build agents.

After upgrading the classic ADO pipeline

It is essential to maintain consistency between the ADO build agents’ OS versions and the version of Microsoft’s Linux Software Repository package manager. They should always match to avoid compatibility issues.

NOTE : This is one approach to fix the issue: ensuring consistency between the ADO build agents’ OS versions and the version of Microsoft’s Linux Software Repository package manager.

--

--