7

I have a SSD as my primary (C:) drive, mainly used for quickly loading games.

It's pretty small (~30 GB) so I want to keep things that don't really need a speed boost off of it. I attempted installing the Visual Studio 2010 Express beta last night, and it claimed to require 2.1 GB of space so I changed the install directory to a secondary, non-SSD drive.

After this, the installer said that it would use 1.8 GB on C: and ~200 MB on the secondary drive.

While this token gesture of moving 1/10 of the app to the place I told it to is cute, I really want to install everything I can to the secondary drive.

Is there any way to install all of Visual Studio 2010 Express to a drive besides C:?

slhck
  • 223,558
  • 70
  • 607
  • 592
TwentyMiles
  • 986
  • 3
  • 10
  • 16
  • 1
    Personally, I put all my games on an HDD and try to keep as much free space on my SSD as possible. The SSD will help with game loading times, but probably won't improve performance in any other way; the GPU and CPU are the bottlenecks. Plus games can use up a lot of space... – sblair Mar 10 '10 at 20:55

4 Answers4

6

No, much of what VS installs (regardless of version) goes into subdirectories in your Windows folder: things such as the .NET frameworks, shared files, etc. So if you installed Windows to the C: drive, VS has to install much of it's core there as well.

BBlake
  • 5,228
  • 2
  • 26
  • 31
  • 1
    That's what I was afraid of. It seems like Microsoft is doing everything it can to make me regret getting an SSD. – TwentyMiles Mar 10 '10 at 17:56
  • 4
    @Twenty: "... to make me regret getting **such a small** SSD." - Fixed that for ya ;-) – fretje Mar 10 '10 at 18:08
  • Yea, that's the main reason I've held off on getting one. My C: drive always ends up being huge by the time I've installed everything I want. – BBlake Mar 10 '10 at 19:20
  • BBlake is correct. Most of Microsoft's programs install big chunks (20-50% of the total size) into the system drive regardless of where you attempt to put it. When you install VS, Office, etc. the a dialog will tell you how much space you need on each drive. Even if you don't use `Program Files\`, it will *always* say it needs space on the drive(s) where `Windows\`, the temp directory, `Common Files`, and maybe even a few other directories are. It's not about SSDs or even their sizes; it's about Microsoft poorly designing their program architectures and ***still*** tightly integrating. – Synetech Jun 26 '12 at 19:31
  • 1
    @BBlake Small SSDs can be quite effective as a cache for larger drives, and many (Intel) motherboards come with controllers with decent support for caching ("Intel Smart Response"). Of course, they're pretty useless as a drive by themselves - trust the computer to know better than you which files are most frequently accessed! – Bob Jul 12 '13 at 11:47
  • +1 @Bob A 32GB cache SSD has a 97.5% hit rate on my system when caching my 2TB system disk. SSD caches are **very** effective on the block level for desktop use. – Darth Android Jul 12 '13 at 14:32
5

Kind of.

The setup DVD contains a file Setup\baseline.dat. This is a large text file which stores information on where to install large chunks of the software.

You need to edit the text file and change the lines which say

DefaultPath=[ProgramFilesFolder]\VC\

...

DefaultPath=[ProgramFilesFolder]\Microsoft Visual Studio 10.0

...

DefaultPath=[ProgramFilesFolder]\Microsoft Visual Studio 10.0\Common7\IDE

to the following

DefaultPath=D:\Applications\VS2010\VC\

...

DefaultPath=D:\Applications\VS2010\Microsoft Visual Studio 10.0

...

DefaultPath=D:\Applications\VS2010\Microsoft Visual Studio 10.0\Common7\IDE

That will get most of the stuff off C.

This also works with VisualStudio 2005/2008 and the Express Editions. I've been using this trick for years and never encountered a problem.

n.B: Some parts of the installer also use locations such as DefaultPath=[WindowsFolder]\assembly. You can edit these in the same way to free up even more space, but I can't guarantee this won't break things. Obviously if you're installing from a DVD/iso you need to copy the entire contents of the DVD to a folder before editing baseline.dat, otherwise it will be read-only.

Gary Oldfaber
  • 199
  • 1
  • 2
  • 6
  • I've just used the tip about editing baseline.dat to point to a SSD drive and now VS2010 won't load and edit my projects. So instead of speeding me up it has wasted half a day. –  Dec 14 '11 at 11:29
  • 1
    Buyer beware? It's worked for me on half a dozen different machines with different hardware over several incarnations of Visual Studio. Worst case scenario is it doesn't work -- like for you -- and you just install Visual Studio on a regular disk, which should take no more than 30 minutes even on an EeePC 901's Intel Atom with 1GB of RAM on a 3.7GB SSD. Use your text editors Find & Replace feature. What exactly took you half a day? If you found a solution I'll edit my original post. – Gary Oldfaber Dec 15 '11 at 14:49
  • Tried it but no use, on Win7x64. For baseline.dat, I changed all occurence of `[ProgramFilesFolder]` to `D:\VS2010`, I still get 600M+ `C:\Program Files (x86)\Microsoft SDKs`. This biggest part, `C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A` still occupies 550MB+ there. – Jimm Chen Nov 23 '15 at 08:54
  • I stopped using Windows 5 years ago, but I think your problem is because you are also installing the Windows SDK, but haven't changed that path. My instructions will move the VS installation, but you need to change additional files to get the Windows SDK to install to D:\ – Gary Oldfaber Nov 23 '15 at 14:58
  • Thanks for replaying, but probably not what you expect. I did it on a rather clean Windows 7 Home Basic virtual machine, no Windows SDK there. – Jimm Chen Nov 23 '15 at 15:04
  • When you install visual studio, one of the options is "also install Windows SDK". Your DVD has another file similar to baseline.dat which tells it where to put the Windows SDK. You need to find that file and change it. My instructions are for installing Visual Studio without the Windows SDK. If you find that file and change it, it will work. Look for a similar file. Good luck. – Gary Oldfaber Nov 28 '15 at 09:50
  • Six years later, I come back to this issue while I rummage through my tech diary. Oh, I now get your idea clearly Gary. I look into `baseline.dat`(actually in **ini** format), and as you expected there is no section about Windows SDK(the package providing bulk of .h/.lib). And I look around the X:\setup folder, neither is there a similar configuration file like that of `baseline.dat`. So I'm still in a loss. Could I ask you how did you find out the way of tweaking baseline.dat? I was quite a unusual way. – Jimm Chen Dec 18 '21 at 13:40
  • It's been 12 years so I might be misremembering, but given that the DVD didn't allow changing the installation path, I probably would've assumed that the DVD contained a hardcoded string pointing to C:\Program Files\. Under that assumption I would've searched for the string "Program Files" in all files on the DVD, then used either an educated guess or trial and error to change it to something else and see if it worked. – Gary Oldfaber Apr 13 '22 at 22:09
1

There are two ways. The easiest is just to install to C and then move the big folders over to your D drive and set up an NTFS junction to link the old location (on C) to the new one (on D).

If your SSD is so small that you cannot do that, then make the folders on your D drive first, then the junction from C to D and then install the program (pointing to the "folder" on C).

The installer will probably complain the the folder you are trying to install to already exists but most will happily continue anyway.

http://support.microsoft.com/kb/205524

Richard
  • 5,831
  • 9
  • 44
  • 73
0

I got a similar problem in Windows XP and found my own solution:

1) In c:\Program Files create manually by yourself all the folders that the VS2010 installation must create for you. This includes at least these folders:

i. c:\Program Files\Microsoft SDKs ii. c:\Program Files\Microsoft Visual Studio iii. c:\Program Files\Reference Assemblies iv. c:\Program Files\Microsoft Visual Studio 9.0

Since these folders are now empty, you can actually mount a logical disk drive on each of them. This effectively increases the size of the C:.

2) Install any additional hard disk and create an extended partition on it. Creates 4-5 logical disk drive on that extended partition. Then in Windows control Panel you can mount these logical disk drive onto the above folders. Now you should got enough disk space for your VS2010 installation.

3) It seems that we cannot use the above approach for the main program installation folder ie. c:\Program Files\Microsoft Visual Studio 10.0. But we can just tell the VS installer to use d:\Program Files.

In addition, Sysinternals got a 'junction' utility allowing one to create symbolic links in Windows Xp to link some folders e.g. c:\Program Files\Microsoft SDKs to say d:\Program Files\Microsoft SDKs. This may be another solution in addition to mounting a logical disk to the folders.

JavaMan
  • 447
  • 2
  • 4
  • 13