I'm running out of space on the partition that has Visual Studio installed. It's safe to copy the installation in another partition?
4 Answers
You could move the files to the new location (manually) and then use Junction (http://technet.microsoft.com/en-us/sysinternals/bb896768.aspx) to create a link back. I did that with 2012 and it seems to be working for me.
-
Worked perfectly for me! (and with VS 2013) Thanks! – Augusto Barreto Apr 23 '15 at 23:35
-
1Great idea, but should you do this, do your future self a favor and tape a giant message to your monitor **"I HAVE JUNCTION"**, so you don't get confused like I did. – Chris O Jan 31 '20 at 18:40
-
1I was trying to do so (vs2022) to have visual studio on my external SSD and MSVS runs but shows this error inside : "The 'Global Hub Client Package' package did not load correctly. The problem may have been caused by a configuration change or by the installation of another extension." and Reset configs or clearing caches don't work. https://developercommunity.visualstudio.com/t/global-hub-client-package-failed-to-load-correctly/1461455 – AbbasAli Hashemian Aug 12 '22 at 14:12
-
@Alix, same error. Supposedly fixed in vs2022, v17.3. After updating to v17.3, AND repairing the installation, it now works with the junction. – pkExec Nov 03 '22 at 10:22
Without having tried I bet this isn't possible.
Installation folders are typically stored in many places such as config files and the registry. After moving, all these references will still point to the old and now invalid location. And, even worse, moving the folder will also break any installation / uninstallation / update routines which means that you will no longer be able to install patches and service packs.
Conclusion: You are way better off uninstalling Visual Studio and moving it to the new location. It takes only a short time as compared to the headache that you would end up otherwise.
(Or, if you don't like to do that you can of course still mount a new partition to the program files folder to increase disc space or get a larger hard drive)

- 172,527
- 53
- 255
- 316
-
On your last point. How well would windows handle the process of copying eveyrthing in Program Files to a new partition, and then mounting that partition at Program Files? – Kibbee Apr 20 '09 at 12:42
-
I wouldn't see a problem with that as long as you have the same file systems (NTFS) on both partitions and copy *all* files with *all* their attributes. – Dirk Vollmar Apr 20 '09 at 13:12
-
-
1If by "takes only a short amount of time" you mean "may not take more than a couple hours" then I agree. :-P (I've got VS2013 Community Edition, which comes as a very small installer that downloads a boatload of data as it installs.) – yoyo Mar 21 '15 at 07:25
I tried repairing or modifying it via the installer (add remove programs), because I moved it to another Partition. But nothing, it crashes with weird error reports.
Uninstalling and reinstalling seems the only choice, but that doesn't work either...
I used a USB Stick, gave it the old HDD label and made a junction like described here:
https://superuser.com/questions/484061/how-to-create-an-ntfs-junction
mklink /J <new directory to be linked> <target directory>
D:\>mklink /J "Program Files\Microsoft Visual Studio 11.0" "K:\Program Files\Mic
rosoft Visual Studio 11.0"
This doesn't work unfortunately because VS still complains about other missing files, but it at least let's you unistall it.
EDIT: If you try to reinstall VS and it won't let you choose a different folder look here at the accepted answer: How to change Visual Studio 2012 install directory?
-
1mklink worked perfectly for VS 2017 Enterprise as well no reinstall required – Husnain Dec 27 '21 at 08:24
No, that wouldn't work with any newer versions of Visual Studio. If it's pre-2003 you might have a chance.

- 1,950
- 1
- 21
- 26