Location of Packages.config

Nov 28, 2010 at 5:50 AM

I don't know if I'm just missing something or what, but is there some way to have one packages.config file per solution? Ideally I'd like to locate it in the packages directory itself.

Nov 28, 2010 at 9:15 PM

The packages.config file is in the project because we need to know what packages are installed per project as well as per solution. For the solution, we use the package file itself to keep track of what is installed. 

Nov 29, 2010 at 1:03 AM

That works as a reason for having the per-project packages.config, but I'm a little unclear about you mean by "package file itself." Can you clarify?

Nov 29, 2010 at 1:05 AM

Also, if it helps, the reason is because I'd like to see, e.g., Castle.Core available out of the list of local packages for every project in the whole solution once it's been added to any of them. You get this behavior where it's least useful, only within the context of a single project. That is why I was asking about having a single one, so it would serve more as an index of what's available than of what's installed. I think NuGet needs both.

Nov 29, 2010 at 4:47 AM

Local Packages are local to a solution not a the machine. When you install a nuget package into a project, it installs it to the solution first then it gets extracted into the project. e.g.:


In the above example, that packages folder is stored at the solution level. The packages.config file, points to packages installed within the current solution.

I hope that clears things up.

Nov 29, 2010 at 8:39 AM
Edited Nov 29, 2010 at 8:46 AM

I understand now. I think I may have confused the issue a little
because ultimately it seems it's not really about packages.config.

The Add Library Reference dialog should probably populate its local
packages list based off of the contents of the packages directory
rather than that project's packages.config, which it seems to do. Am I
missing a way to do this now or is this something I should file a
feature request against?

Nov 29, 2010 at 1:40 PM

I'm not sure what your feature request is for. When you open the Add Library Reference dialog, the list of Installed Packages comes from packages.config within that specific project, not the entire solution. 

Nov 29, 2010 at 4:46 PM

I think I understand.

We can’t change the list of “Installed” packages to include Castle.Core just because it’s installed in one of the local projects. Otherwise, how would you ever install it in another project within the same solution?

However, we could have another node that lists all packages in the solution. Would you find that more useful than a “Recent Packages” node or a “Favorite Packages” node?

Nov 29, 2010 at 5:00 PM

BTW, in the meanwhile, if you open the Package Manager Console and type:


That will show you all the packages installed in your solution.

Nov 29, 2010 at 5:50 PM
Edited Nov 29, 2010 at 5:51 PM

This is exactly what I mean. I don't care if it's a separate node, but
it would be nice if that selection is stateful between instances of
the dialog.

I think the combination of All Packages in My Solution with custom
feed sources will be a nice win for big projects, particularly once
someone writes an msbuild plugin to automatically generate the package
files, if it hasn't been done already.