问题
I have a machine where the C:\ drive is running out of space and I'd like to change the location where my DNX/DOTNET packages are installed to a location under my D:\ drive.
Is the package cache location configurable?
NOTE: I don't have the flexibility to change my profile location to a different drive.
回答1:
Use the NUGET_PACKAGES
environment variable and set it to a path you prefer.
Specifically, open up System Properties, create a user environment variables called NUGET_PACKAGES
, and set it to a path of your choosing.
You will need to restart Visual Studio and any other programs for them to see the updated environment variable.
This works with Nuget 3.3 / .NET Core RC1.
来源:https://stackoverflow.com/questions/35710866/can-the-dnx-dotnetcore-package-cache-location-be-changed