Visual Studio[2022] is continuously prompting for login credentials when I try to restore the NuGet packages or build the solution


Unable to load the service index for source https://pkgs.dev.azure.com/microsoft/_packaging/WDG/nuget/v3/index.json.

Looks like the source is your private package source hosted on Azure DevOps.

Please check the following points:

  • Please make sure the account you login to is a member in your DevOps and has sufficient permission in DevOps.
  • Please make sure it’s a valid source URL. You can check this in your feeds via this guide.

You can also expand the NuGet Package Manager section and add a nuget.org(if you don’t have one) source in Package Sources and switch WDG to nugt.org to restore your packages and check if you can restore packages from public nuget org.
enter image description here

https://api.nuget.org/v3/index.json

Check all Package Sources in your nuget.config file.(Windows:%appdata%\NuGet\NuGet.Config)

 <packageSources>
    <add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
    <add key="devops" value="https://pkgs.dev.azure.com/xxx/_packaging/xxx/nuget/v3/index.json" />
  </packageSources>

Leave a Reply

Your email address will not be published. Required fields are marked *