Search code examples
azure-devopsazure-pipelinesazure-artifacts

Using an artifact that is published to an Azure Dev Ops project


I have configured a feed source for Artificats in Azure DevOps. I can publish to the feed from the CLI and the packages show up in the Visual Studio UI successfully:

image of visual studio ui

The artifacts show as expected in the DevOps UI as well:

enter image description here

I have added the feed url as a source to the project within the nuget.config file. However, during the Pipeline build I get a 401 error:

enter image description here

I assumed that having the build service as an authorized user would be sufficient, but clearly I'm missing something:

enter image description here

How do I configure this so that my pipelines have access to get the packages?


Solution

  • Make sure you add a NuGet Auth task prior to the task running dotnet restore. It will add the right configuration for the build job.