Nuget: Change package directory path and name

Rookian picture Rookian · Oct 3, 2011 · Viewed 20.3k times · Source

Is it possible to change the name and the path of the created nuget package directory?

My current folder structure is like this:

+src

++Project1

++Project2

++packages

I'd like to have a folder structure like this:

+Lib (packages)

+src

++Project1

++Project2

Answer

Brett Allred picture Brett Allred · Apr 10, 2012

You can do this by creating a file called nuget.config and storing it in the same location as your solution file.

The config file should look like this:

<settings>
    <repositoryPath>../libs/packages</repositoryPath>
</settings>

That's it.

Obviously you can put whatever path you want. Hope that helps.