Maybe you’re trying to change the location of the packages folder where all the stuff gets installed using the NuGet Package Manager in Visual Studio.

There’s a handy solution that will work: You have to place a new config file called nuget.config wherever you want in your folder structure. There, you will have to put this piece of code:

<settings>
	<repositoryPath>myfolder\packages</repositoryPath>
</settings>

The path is always relative to the nuget.config‘s ubication so, in this example, it will look for a folder named myfolder just in the directory where nuget.config is placed.

As you can see in the following folder structure it will place the packages folder under myfolder.

myfolder
    packages
    myfolder2
       packages
nuget.config

Consequently, if you put :

<settings>
	<repositoryPath>myfolder\myfolder2\packages</repositoryPath>
</settings>

It will search under myfolder2.

More information here.