Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VS2015 nuget package manager not finding packages

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?

like image 948
Shiloh Avatar asked Apr 03 '16 14:04

Shiloh


People also ask

How do I fix a missing NuGet package?

Enable package restore by choosing Tools > Options > NuGet Package Manager. Under Package Restore options, select Allow NuGet to download missing packages. In Solution Explorer, right click the solution and select Restore NuGet Packages.

How do I enable manage NuGet packages in Visual Studio?

In Solution Explorer, right-click References and choose Manage NuGet Packages. If you want more information on the NuGet Package Manager, see Install and manage packages using Visual Studio. Accept any license prompts. If prompted to review changes, select OK.

How do I add a NuGet package to Visual Studio 2015?

After installing the NuGet or if you are using the Visual Studio 2015, to open the Package Manager Console, click on Tools Menu and choose NuGet Package Manager and then choose Package Manager Console. Here you can write the command to install packages which is required in your application.


1 Answers

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.

like image 139
Livven Avatar answered Oct 11 '22 15:10

Livven