.netdnxdnudnx50

Can the dnx/dotnetcore package cache location be changed


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.


Solution

  • 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.

    enter image description here

    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.