6
votes

I'm trying to install visual studio 2017 with Xamarin which requires ~30GB of space and I have this amount available in the directory that VS2017 is currently installed in. I'm trying to basically modify the install to add Xamarin to it, however it says I don't have enough disk space because despite the download directory being in my D drive, it's still trying to install components to my C drive. I haven't been able to find anything about this issue online yet.

Visual studio installer:

enter image description here

File explorer (notice C drive has less than the required amount available)

enter image description here

2
Care to explain the downvotes?px06
@epascarello "2 years ago", and VS is already installed successfully on my secondary hard drive so my issue is nothing similar to that thread.px06
Quite a few things install into c:\program files\common files, into c:\program files\msbuild, Windows SDKs and others. So a lot of things won't install to the path you selected and there is nothing you can really do about it. Use a resize tool to resize your C drive if possible.jessehouwing

2 Answers

5
votes

One possible issue is that not everything installed by VS goes into the VS installation folder. There are generally (I'm simplifying a little bit here) two types of install packages that will get pulled in:

  1. Instance-based packages affect this instance of VS, but no others. These are things like your Visual Studio shell, most of the components you select, and well, anything that gets installed to the path you've specified.

  2. Global packages or "singleton packages" as they're sometimes called are installed once and shared across all installs of VS2017. These can include things like SDKs, any components that are installed to the system registry or GAC, and could also include large tools like emulators.

There's a good chance that the Xamarin features are pulling in many of the 2nd type, which would get installed to Program Files by default. I don't know of a way to specify an alternative install path for these types of packages.

1
votes

I found the following tip at https://www.codeproject.com/Messages/5476334/Re-Visual-Studio-and-SSDs.aspx
Use symlinks to move some folders from C: to D: or another partition.

  1. create a new folder "D:_moved_from_C_ProgramFilesX86"
  2. move "C:\Program Files (x86)\Microsoft SDKs" to "D:_moved_from_C_ProgramFilesX86\Microsoft SDKs"
  3. run this command from a command prompt, running as administrator:
    mklink /J "C:\Program Files (x86)\Microsoft SDKs" "D:\_moved_from_C_ProgramFilesX86\Microsoft SDKs"
  4. repeat the same with "C:\Program Files (x86)\Windows Kits"