Search code examples
windowssymlinkdnxdnvm

How to move .dnx directory out of %USERPROFILE%


DNVM installs a .dnx directory in C:\Users\myUsername\.dnx (in %USERPROFILE%).

Unfortunately, my user profile is limited to 30 MB by IT policies.

How can I move this directory to somewhere else, e.g. C:\.dnx?

I tried creating a symbolic link from C:\Users\myUsername\.dnx to C:\.dnx, but it seems like Visual Studio does not follow symlinks when building the solution, so I get build errors such as this:

Could not find a part of the path 'C:\Users\myUsername\.dnx\packages\System.IO\4.0.10-beta-22816\lib\contract\System.IO.dll'.

I'm using Visual Studio Community 2015 RC with .NET 4.6 under Windows 7 Professional.


Solution

  • I found a "temporary" workaround by making the .dnx directory non-roaming, via this registry key: HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\ExcludeProfileDirs

    You can find more details about this workaround here.