NuGet Package Manager Error Resolution

Today I encountered an error while I was trying to add a reference for newtonSoft.JSON from the NuGet Package Manager of Visual Studio 2010. Initially, I struggled and attempted various ways to resolve this and finally succeeded in resolving this. Please use this approach to resolve such NuGet errors.

I encountered an error as given below:

Could not connect to the feed specified at "https://nuget.org/api/v2/"'. Please verify that the package source (located in the Package Manager Settings) is valid and ensure your network connectivity.

your network connectivity

There are a few steps recommended to resolve an error as shown below:

Step 1

Open the file devnev.exe.config at C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE.

Step 2

Take a backup of this file for precautionary purposes.

Step 3

Open this file and find system <System.Net> </System.Net> that you may see at the bottom of this file.

Step 4

Add the following segment into <System.net> as shown below:

  1. <system.net>   
  2.     <settings>   
  3.       <servicePointManager expect100Continue="false" />   
  4.       <ipv6 enabled="true"/>   
  5.     </settings>   
  6.     <defaultProxy useDefaultCredentials="true" enabled="true">   
  7.       <proxy usesystemdefault="True"/>   
  8.     </defaultProxy>   
  9. </system.net>  
Step 5

Save and close this file.

Step 6

Reopen Visual Studio 2010.

Step 7

For finding the package, first we need to open the Package Manager Console. We can open it as in the following:

 

  • From the Tools menu.

  • Select "Library Package Manager".

  • Then select "Manage NuGet Packages for Solution".

    Manage NuGet Packages for Solution

  • Open the NuGet Package Manager and type your desire file name, for examle I specified NewtonSoft.Json.

    NuGet package manager

As soon as you have succeeded in downloading, a welcome message page is shown as in the following:

succeeded to download

I hope it will help to resolve your issue.

Thanks.


Similar Articles