Specifying packages directory in nuget's default config file

Topics: General
Jul 5, 2012 at 11:46 PM

I'd like to add the ability to specify the location of the packages directory in nuget's default config file (the one in %APPDATA%\NuGet\NuGet.Config or the in .\nuget\nuget.workspace.config somewhere up the tree if http://nuget.codeplex.com/discussions/359691 is implemented).

This would be similar to the ability to specify a repositoryPath in the solution's .nuget\nuget.config file.

Difference would be:
- this would work in the absence of a .nuget\nuget.config file at the solution level
- this would work as a default for the "-OutputDirectory" option of the install command of NuGet.exe
- this would work as a default for the  "-RepositoryPath" option of the update command of NuGet.exe

Reasons for feature: our org has hundreds of projects. We do not check-in solution files, and this is enforced by policy. We have the same packages and packages versions re-used by multiple projects. Both the VS addin and the command line version of NuGet are used. We are already using workspaces (i.e. nuget.workspace.config).
As a result, having a single default location per workspace used consistently for our hundreds of projects regardless of how NuGet is being invoked (VS or cmd line; with or without solutions) would greatly reduce the amount of I/O and overall disk usage. It would also increase visibility of packages being used, and would simplify adding subsequent features such as pre-fetching of packages at the entire workspace level to allow for offline builds.

Let me know what your thoughts are.


Jul 6, 2012 at 10:59 PM

pull request: http://nuget.codeplex.com/SourceControl/network/forks/vdbg/Config/contribution/3071

Jul 6, 2012 at 11:48 PM

Seems to me you could just use nuget.exe for what you do. Then you could put the packages wherever you want.