Closed b0 closed 6 years ago
Why do you want to install those things to another folder?
I don't mind it too much this way but maybe i want that folder on my SSD drive? Or, userprofile folder can be size limited by group policy(by domain admin) so some devs just won't have enough space there...
Is there a reason why dnvm,dnx,packages have to be there?
Would this be a reasonable solution to you? https://github.com/aspnet/dnvm/issues/250
It's definitively better than current state but still, we can't specify any other folder. It is not uncommon that devs want packages and framework version on other drive(etc. D:\dnx).
Even though the default behavior is to put it there, it is configurable. You can set the DNX_USER_HOME
and DNX_GLOBAL_HOME
environment variables to set the user-level and global install locations respectively and DNVM will honor that. Also, you can set DNX_HOME
to a semicolon-separated list of search directories and DNX launchers will respect that. For example, if you want to move your user-level installs to D:\dnx
you'd just set the following:
DNX_USER_HOME=D:\dnx
DNX_HOME
is supposed to be defined to be %DNX_USER_HOME%;%DNX_GLOBAL_HOME%
(dynamically expanded each time it is used) by default so that should be all you need.
With that, you can either leave dnvm.ps1
where it was (since it's a small script) or move it as well and just adjust your PATH
.
NuGet packages will still install under %USERPROFILE%\packages
, but you can use global.json
to override that.
Currently, in dnvm.ps1 dnvm-setup function there is hardcoded var $DestinationHome = "$env:USERPROFILE\$DefaultUserDirectoryName".
What is the best way to install dnvm(and then dnx) to some other folder? Can this feature be added?