Package Manager is confused by centralized packages folder


I currently have NuGet Package Restore enabled and I'm using "repositoryPath" to store the packages for all the projects on my development machine in a single location.

NuGet Package Manager does not appear to be designed to handle this scenario properly.

When attempting to "Manage NuGet Packages for Solution", the installed packages list contains all the packages in my Packages folder, not just the packages that are currently being used by the projects in my solution. This causes various problems, such as packages that need updating not showing up in the Updates list.

If I attempt to manage packages at the project level (rather than for the whole solution), I also get strange behavior where sometimes no items appear in the Update list even though I know updates are available.

file attachments


feiling wrote Feb 12, 2013 at 12:21 AM

deepakverma wrote Apr 12, 2013 at 9:13 AM

reactivating as this is only fixed for the installed tab. online and update tab still shows packages that are not in the solution

dotnetjunky wrote Apr 12, 2013 at 12:51 PM

what packages and what versions? Online tab always shows all packages. Update tab should not.

deepakverma wrote Apr 12, 2013 at 6:55 PM

Any package. Online tab shows a green tick and update shows the package for updating.

dotnetjunky wrote Apr 13, 2013 at 1:25 AM

Move to 2.6 because the fix is not clean and it may affect perf

WayneBrantley wrote May 14, 2013 at 1:31 PM

After a while of using nuget and ending up with lots of old versions in the packages folder, the 'update' from solution shows lots of packages that need updating.

Clicking update on them brings up a window that has everything grayed out, because the update is not needed. Updating from project level correctly shows no update is needed.

Removing all packages from packages folder and then rebuilding (causing packages to be downloaded again) fixes it and the 'update' from the solution level correctly shows what really needs updated.

In this case, I am not using a single repository path for all solutions.

danbolger wrote Jun 22, 2013 at 1:52 AM

The issue description is a little ambiguous so here is a concrete example of a problem that is affecting us.

We have a very large application that has tens of solutions and hundreds of projects. We have Enabled NuGet package restore and manage packages at the solution level. We use a centralised packages folder which we specify by setting the repositoryPath in the NuGet.config file.

So I go to the first solution, go to the Online tab, search for my package, click the install button and select the projects I want that package installed to in that solution. After this is done, I have a local copy of the package in my shared packages folder.

Then I go to the second solution because I want to add the package there also. I open up the package manager dialog, go to the online tab, search for the package and when it is displayed in the search results, there is no Install or Manage button, and instead, I see a green tick indicating the package is installed. Yes the package now sits in my locally shared packages folder because of the work I did with solution 1, but no, it is not added to any of projects in solution 2, and I don't have a manage button so that I can add it to any of those projects.

To work around this, I have to use the Package Manager console and select each project individually in the drop down and execute Install-Package PackageName

Using NuGet version 2.5.40416.9020

stijnherreman wrote Sep 3, 2013 at 9:09 AM

Same issue as WayneBrantley here. Packages that are no longer used remain available in the "Updates" tab, and it's impossible to update the package for any project.

UberError wrote Nov 27, 2013 at 7:33 PM

Same issue here. Please patch.