Search code examples
azure-devopsnuget

AzureDevops Pipeline issue error NU1301: Unable to load the service index for source


I am having an issue with AzureDevops building a project. It's DotNet6, It's failing the .Net Core Restore with an error: error NU1301: Unable to load the service index for source. It's a library project with two dependencies, both from NuGet:

  • Microsoft.AspNetCore.Http.Abstractions v2.2.0
  • Stripe.net - 41.2.0

The project builds perfectly in VS2022.

Does anyone have any ideas?


Solution

  • Despite both packages (below) being #DotNetCore 6 compatible, the AzureDevops .NetCore Restore consistently failed.

    I created a new pipeline using the NuGet command instead, and all was fine.

    • Microsoft.AspNetCore.Http.Abstractions v2.2.0
    • Stripe.net - 41.2.0