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
If you're using Visual Studio 2019 and NuGet version 4 (or above), you may change the path by editing the NuGet. config file. Add "globalPackagesFolder" and "repositoryPath" keys to the config file. Set the values that you wanted.
nuget folder is used as a cache for packages downloaded to speed up project restore and compilation. It can safely be removed.
The location of the default global packages folder. The default is %userprofile%\. nuget\packages (Windows) or ~/. nuget/packages (Mac/Linux).
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With