VS2015 nuget package manager not finding packages

43,085

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

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

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 the NuGet.config file in the %AppData%\NuGet\ folder and restart Visual Studio. A new NuGet.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.

Share:
43,085
Shiloh
Author by

Shiloh

Updated on December 09, 2020

Comments

  • Shiloh
    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
    RonC about 8 years
    This 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
    jleach about 8 years
    the stupid little things that trip me up when I should be getting work done instead... worked like a charm, thanks
  • Conrad Lotz
    Conrad Lotz about 7 years
    Perfect! Thank you
  • Nigel B
    Nigel B almost 7 years
    In my case (Windows 8.1) config file found at: C:\Users\<your user name>\AppData\Roaming\NuGet
  • Fabito
    Fabito over 6 years
    It 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
    Jordi about 4 years
    Solved in my case after removing the package source from the <disabledPackages> under %AppData%\NuGet and then restarting VS
  • Venkataramana Madugula
    Venkataramana Madugula about 4 years
    This helped me to fix the issue. Thanks a ton.