I have a machine whose C:\ drive has limited space, but I have a large D:\ drive with plenty of space is it possible to change the location of the nuget package cache (I am using nuget 3.x)?
Set an environment variable NuGetCachePath
with the value of the path where you want the new package cache.
UPDATE: This answer is from 2016 and is no longer relevant for more modern versions of NuGet. As indicated below by @Mohsen the new Environment Variable to set is NUGET_PACKAGES
You can override the default nuget package cache folder by an environment variable:
NUGET_PACKAGES
Reference: Manage Global Packages and Cache Folder
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