Nuget restore fails on Azure Devops with message “unable to load the service index for source”

For thoses comming here in 2021 for the same error message, adding the NuGetAuthenticate@0 task before the pack command may be the missing piece:

- task: NuGetAuthenticate@1

- task: DotNetCoreCLI@2
  inputs:
    command: 'pack'
    packagesToPack: $(projectPath)
    includesymbols: true
    includesource: true
    versioningScheme: 'off'
    verbosityPack: Normal
  displayName: 'Dotnet Pack'

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)