Unable to load the service index for source https://api.nuget.org/v3/index.json while restoring nuget packages in VS 2022.

Munjal, Kanha (Gurugram) 5 Reputation points
2024-06-11T10:51:54.7633333+00:00

Hi All,

I am getting the error "Unable to load the service index for source https://api.nuget.org/v3/index.json while restoring Nuget packages in VS 2022. I have tried to delete Nuget config file as well but it did not help. Can anyone please provide assistance?

Developer technologies .NET Other
{count} vote

2 answers

Sort by: Most helpful
  1. Jiachen Li-MSFT 34,221 Reputation points Microsoft External Staff
    2024-06-11T12:39:59.11+00:00

    Hi @Munjal, Kanha (Gurugram) ,

    You can try clearing the NuGet cache using the command nuget locals all -clear.

    Or try updating your vs2022 to the latest version.

    If you're behind a proxy, ensure your proxy settings are correctly configured.

    • Open Visual Studio.
    • Go to Tools > Options > Network.
    • Configure your proxy settings accordingly.

    Also check nuget.config reference about proxy.

    Best Regards.

    Jiachen Li


    If the answer is helpful, please click "Accept Answer" and upvote it.

    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.

    2 people found this answer helpful.

  2. Singh, Abhishek (Cognizant) 0 Reputation points
    2025-04-18T09:35:50.31+00:00

    You need to check 3 things1. Check your internet connection

    1. Step 2: Verify NuGet Source in Visual Studio

    Open Visual Studio.

    Go to: Tools NuGet Package Manager Package Manager Settings.

    Go to: Package Sources.

    Make sure you see:

    Name: nuget.org

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

    3Update the latest version of TLS

    [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12


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.