0

Azure DevOps private build agent is trying to download older dotnet version packages as part of the Nuget restore task which are not used in project anymore and failing in a specific pipeline only. The same build agent has no issues in any other pipelines for the same nuget restore task. My question is that whether a specific pipeline can cache nuget restore separately and failing because of that..?

2
  • can you share at which specific task within the pipeline it is failing and the error message? Commented May 27, 2020 at 14:16
  • Already mentioned: Nuget Restore Task and the error message says: ##[error]The nuget command failed with exit code(1) and error(Errors in packages.config projects Unable to find version '9.3.0' of package 'Edge.js'. We are not using this version of edge.js anymore but somehow it is trying to download older packages and this package version doesnt exist in nuget repo so its failing. Commented May 27, 2020 at 17:29

1 Answer 1

1

Azure Devops private build agent failing at nuget restore task

According to the error message in your commemt:

Errors in packages.config projects Unable to find version '9.3.0' of package 'Edge.js'. We are not using this version of edge.js anymore but somehow it is trying to download older packages and this package version doesnt exist in nuget repo

nuget is restoring a nuget package that you no longer use, and this package version does not exist in nuget repo, so it fails.

To resolve this issue, we need to remove that package from our project. If you have packages.config, please remove below item in it:

<package id="Edge.js" version="9.3.0" targetFramework="net461" />

If your project is .net core, you need open your project file .csproj file and remove below item in it:

<PackageReference Include="Edge.js" Version="9.3.0" />

If you have already done this, then you need to check the repo and branch associated with your current pipeline to confirm that the source code on the branch of the associated repo is updated.

If above answer not resolved your question, please share more info about your build definition and the package info in your project.

Hope this helps.

Sign up to request clarification or add additional context in comments.

1 Comment

Actually your answer helped me figure out the solution. I activated cleanup of sources and output directory prior to checkout of source code in the ADO pipeline which solved the issue so i guess previously it was running the tasks on outdated code.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.