VS2015 nuget package manager not finding packages
Solution 1
The nuget.org package source is still there after the upgrade for me. But if it ever disappears you can add it back as:
Name: nuget.org
Solution 2
This is a known issue with nuget version 3.4, which is included with Visual Studio 2015 Update 2:
The NuGet.config file in your
%AppData%\NuGet\
folder has accidentally been emptied. To fix this: Close Visual Studio 2015, delete theNuGet.config
file in the%AppData%\NuGet\
folder and restart Visual Studio. A newNuGet.Config
file will be generated and you will be able to proceed.
Solution 3
I am using Visual Studio 2015 Update 2 and had the Original Poster's issue. My package source config file was not deleted but the nuget source was set to https://api.nuget.org/v3/index.json
. I had to manually open the config file and change the URL to http://api.nuget.org/v3/index.json
in order to get packages to appear. However, I got errors when attempting to download the package I needed. So finally I checked for updates, saw Visual Studio 2015 Update 3, installed it, and now I can finally see the packages, download and install them (using the http address - the https did not work)!
Solution 4
After Upgrading Visual Studio 2015 in September 16, my NuGet.config had been renamed as NuGet_temp.config. I deleted the NuGet.config file and renamed the _temp version as NuGet.Config.
After that all of my packages are showing again.
Solution 5
For me it was a genuine temporary network problem. IVe tried again a bit later, and the error disappeared.
Shiloh
Updated on December 09, 2020Comments
-
Shiloh over 3 years
I installed VS2015 Update 2 and now nuget package manager does not find any packages outside of the "Microsoft and .net" package source. It looks like the nuget package source was removed. When I add it back as "http://www.nuget.org" I get an error "Unable to retrieve results from one or more sources".
Anyone else having this problem?
-
RonC about 8 yearsThis solved my problem, thank you. After installing nuget with VS2015 Update 2 I only had "Microsoft and .Net" as a package source. But when I deleted the nuGet file you suggested and restarted visual studio, I had all three package sources back: "All", "Microsoft and .Net" and "nuget.org". Yea! For others having this issue, I found my nuGet.config file at C:\Users\Ron.RONDEV\AppData\Roaming\NuGet.config
-
jleach about 8 yearsthe stupid little things that trip me up when I should be getting work done instead... worked like a charm, thanks
-
Conrad Lotz about 7 yearsPerfect! Thank you
-
Nigel B almost 7 yearsIn my case (Windows 8.1) config file found at: C:\Users\<your user name>\AppData\Roaming\NuGet
-
Fabito over 6 yearsIt worked to me, for some reason the previous nuget.config was breaking the nuget restoration, after recreating the file witht he same content of the previous nuget.config, it started working perfectly... good hint!
-
Jordi about 4 yearsSolved in my case after removing the package source from the <disabledPackages> under %AppData%\NuGet and then restarting VS
-
Venkataramana Madugula about 4 yearsThis helped me to fix the issue. Thanks a ton.