Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to install Visual Studio 2015 on a different drive

I'm trying to figure out how to install Visual Studio Community 2015 on another drive besides my C:\ drive. Every time I open the installer of VS it shows the save location but won't let me change it:

visual studio install dialog with inactive path for install location

I'm wanting to change the download destination to my D:\ drive. If there is a work around could someone give me a hand? I've searched for about a few hours now, and I can't find anything relating to my issue.

like image 537
Bryan Olesky Avatar asked Aug 15 '15 21:08

Bryan Olesky


People also ask

Can I install Visual Studio on another drive?

You can reduce the installation footprint of Visual Studio on your system drive by changing the location of some of its files. Specifically, you can use a different location for the download cache and shared components, tools, and SDKs.

How do I change storage location in Visual Studio?

In Visual Studio, click Tools > Options. Expand Projects and Solutions and click Locations. The Projects location field defines the default location for storing new projects. You can change this path if you are using a different working folder.

Can I install VS code in D drive?

No, unfortunately most of Visual Studio still gets installed on the main drive. Regarding to this forum thread 75% of VS gets installed on the main drive and just 25% on the chosen drive. So you have no choice but to make space on your c drive.


1 Answers

Run the installer from command line with argument /CustomInstallPath InstallationDirectory

See more command-line parameters and other installation information.

Note: this won't change location of all files, but only of those which can be (by design) installed onto different location. Be warned that there is many shared components which will be installed into shared repositories on drive C: without any possibility to change their path (unless you do some hacking using mklink /j (directory junction, i.e."hard link for folder"), but it is questionable whether it is worth it, because any Visual Studio updates will break those hard links. This is confirmed by people who tried that, although on Visual Studio 2012.)


Update: per recent comment, uninstallation of Visual Studio might be required before the above applies. Uninstallation command is like this: vs_community_ENU.exe /uninstall /force

like image 60
miroxlav Avatar answered Sep 28 '22 16:09

miroxlav