leifericf
leifericf

Reputation: 2372

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.

Upvotes: 8

Views: 4617

Answers (3)

kjbetz
kjbetz

Reputation: 156

I had an issue come up where my employer is blocking .exe files executing in user profile directories.

I moved the my C:\Users\%USERPROFILE%.dnx folder to C:\Program Files.dnx and created a symlink with the following command:

mklink /D C:\Users\%MYPROFILENAME%\.dnx "C:\Program Files\.dnx"

So far, this seems to be working and I am up and running.

Upvotes: 4

leifericf
leifericf

Reputation: 2372

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.

Upvotes: 2

i486
i486

Reputation: 6573

Use junction tool by MS to create alias of the directory on other volume. Download junction.exe and read the usage.

Upvotes: 0

Related Questions