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

2023-03-06T09:10:43.4133333+00:00

1.Error: Unable to load the service index for source https://pkgs.dev.azure.com/azurecom/_packaging/OnyxNugetsFeed/nuget/v3/index.json.

2.The nuget package manager always prompts "some NuGet packages are missing from this solution. Click to restore from your online package sources". When I click the "restore" button, it prompts that it cannot be found.

I tried the following methods and failed,

    1. At https://www.nuget.org/downloads Download the latest nuget.exe replacement
    1. Close VS and delete the entire nuget.config file under C:\Users\xxx\AppData\Roaming\NuGet.
    3.open Nuget Package Manager -> Package Source > Add https://nuget.org/api/v2

Do you have any other better solutions.

Developer technologies Visual Studio Other
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Tianyu Sun-MSFT 34,436 Reputation points Microsoft External Staff
    2023-03-07T10:11:46.4133333+00:00

    Hello @Amber Cheng (BEYONDSOFT CONSULTING INC)

    Welcome to Microsoft Q&A forum.

    There are many situations that may cause this issue.

    1. Network Issue.
    2. The source doesn’t exist.

    Please copy the url to the address bar of browser and try to access it. This will be helpful to exclude the above two situations.

    1. NuGet cache.

    Please try to clean nuget cache.

    Besides, please try to modify the nuget.config file like following: 

    <?xml version="1.0" encoding="utf-8"?>
    <configuration>
      <packageSources>
        <clear />
        <add key="XXXXX" value=https://pkgs.dev.azure.com/YYYYY/_packaging/YYYYY/nuget/v3/index.json />
      </packageSources>
      <packageSourceCredentials>
        <XXXXX>
          <add key="Username" value="<Change this with the user name you want.>" />
          <add key="ClearTextPassword" value="<Change this with the personal access token>" />
        </XXXXX>
      </packageSourceCredentials>
    </configuration>
    
    

    Please feel free to let us know if any of above methods works.

    Sincerely,

    Tianyu


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    1 person found this answer helpful.

  2. NathanVG 5 Reputation points
    2024-01-29T14:27:24.1633333+00:00

    Hello, we are having the same issue, locally everything works fine, but when building the project through an azure pipeline we get the same error.

    I can not accept however that the sollution is commiting my username and password in plain text. Are there any other options?

    1 person found this answer helpful.

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.