NuGet package issues with Azure Pipelines

Hi all.

I have been trying to deploy Azure Pipelines for one of my projects which uses FastReports engine. The problem I experience at this time is "error NU1301: Unable to load the service index for source". In the nuget file I have other feeds registered which work just fine without any issues. And it also works locally.

I have added the credentials in my nuget.config file so it should pick them up during restore phase.

Has anyone encountered such issue?

Thanks.

Comments

  • Hello!

    The error in Azure Pipelines occurs because the encrypted credentials from your local `nuget.config` file are tied to your user profile on your workstation and are not decrypted on the CI agent.

    What to do in Azure DevOps:

    In your Azure DevOps project, go to Project Settings -> Service connections -> New service connection -> NuGet (specify the URL of your private FastReport .NET feed

    In the YAML pipeline, before `dotnet restore` / `DotNetCoreCLI@2`, add the `NuGetAuthenticate@1` task with this service connection, or select `feedsToUse: “config”` with the `externalFeedCredentials` binding.

This discussion has been closed.