NuGet Package Manager Error : Could not connect to the feed specified at ‘https://nuget.org/api/v2
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.
There are a few steps recommended to resolve an error as shown 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.
In order to resolve an error I made certain changes as shown below;
Step1 . Open file devnev.exe.config placed at C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE
Step2. Take a backup of this file.
Step3 . Open this file and find system <System.Net> </System.Net> ,which you may see at bottom of this file.
Step4 . Add the following segment into <System.net> as depicted 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>
Step5. Save and Close this file.
Step6: Reopen Visual Studio 2010.
Step7: 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".
- Open the NuGet Package Manager and type your desire file name, for examle I specified NewtonSoft.Json.
As soon as you have succeeded in downloading, a welcome message page is shown as in the following:
Hope it will help to resolve your issue.
Thanks
To know more MVC and WebApi Kindly go through with these links
0 comments :
Post a Comment