title | description | ms.date | ms.custom | ms.topic | helpviewer_keywords | author | ms.author | manager | ms.workload | ms.prod | ms.technology | ||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Select installation locations |
Learn how to reduce the installation footprint of Visual Studio on your system drive by changing the location of the download cache, shared components, SDKs, and tools to different drives. For example, move some files from the C drive to the D drive. |
11/28/2022 |
vs-acquisition |
how-to |
|
anandmeg |
meghaanand |
jmartens |
multiple |
visual-studio-windows |
vs-installation |
Select the installation locations in Visual Studio
[!INCLUDE Visual Studio]
::: moniker range=»>=vs-2022″
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.
::: moniker-end
::: moniker range=»vs-2019″
You can reduce the installation footprint of Visual Studio on your system drive by changing the location for some of its files. Specifically, you can use a different location for the download cache, shared components, SDKs, and tools files.
::: moniker-end
[!NOTE]
There are some tools and SDKs that have different rules on where they can be installed. Such tools and SDKs are installed on your system drive even if you choose another location.
Get started
::: moniker range=»vs-2019″
-
When you install Visual Studio, choose the Installation locations tab.
-
In the Visual Studio IDE section, accept the default. Visual Studio installs the core product and includes files that are specific to this version of Visual Studio.
[!TIP]
If your system drive is a solid-state drive (SSD), we recommend that you accept the default location on your system drive. The reason? When you develop with Visual Studio, you read from and write to a lot of files, which increases the disk I/O activity. It’s best to choose your fastest drive to handle the load. -
In the Download cache section, decide if you want to keep the download cache, and then decide where you want to store its files.
-
Check or uncheck Keep download cache after the installation.
If you decide not to keep the download cache, the location is used only temporarily. This action won’t affect or delete files from previous installations.
-
Specify the drive where you want to store installation files and manifests from the download cache.
For example, if you select the «Desktop development with C++» workload, the temporarily required size is 1.58 GB on your system drive, which is then freed as soon as the installation completes.
[!IMPORTANT]
This location is set with your first installation and cannot be changed later from the installer UI. Instead, you must use command-line parameters to move the download cache.
-
-
In the Shared components, tools, and SDKs section, note that it uses the same drive that you chose in the «Download cache» section. The MicrosoftVisualStudioShared directory is where Visual Studio stores the files that are shared by side-by-side Visual Studio installations. SDKs and tools are also stored in this directory.
::: moniker-end
::: moniker range=»>=vs-2022″
-
When you install Visual Studio, choose the Installation locations tab.
:::image type=»content» source=»media/vs-2022/vs-installer-installation-locations-tab.png» border=»false» alt-text=»Screenshot showing the Installation locations tab of the Visual Studio Installer.»:::
-
In the Visual Studio IDE section, accept the default path. Visual Studio installs the core product, and includes files that are specific to this version of Visual Studio.
[!TIP]
If your system drive is a solid-state drive (SSD), we recommend that you keep the core product on your system drive. The reason? When you develop with Visual Studio, you read from and write to a lot of files, which increases the disk I/O activity. It’s best to choose your fastest drive to handle the load.[!IMPORTANT]
You can select a different location only when you first install Visual Studio. If you’ve already installed it and want to change the location, you must uninstall Visual Studio and then reinstall it. -
In the Download cache section, decide whether you want to keep the download cache, and if so, where you want to store its files.
-
Check or uncheck Keep download cache after the installation.
If you decide not to keep the download cache, the download cache location is only temporarily used. This action won’t affect or delete files from previous installations.
For example, if you select the «Desktop development with C++» workload, the temporarily required size for the download cache location is 1.28 GB. As soon as the installation completes, downloaded cache files are removed, leaving only package metadata.
-
Specify the folder path, including the drive, where you want to store the installation files and manifests from the download cache.
[!IMPORTANT]
You can select a different location only when you first install Visual Studio. If you’ve already installed it and want to change the location, you must uninstall Visual Studio and then reinstall it. -
-
In the Shared components, tools, and SDKs section, select the folder where you want to store the files that are shared by side-by-side Visual Studio installations. SDKs and tools are also stored in this directory.
[!IMPORTANT]
If you’ve installed Visual Studio on your computer before, you won’t be able to change the Shared components, tools, and SDKs path and it will appear greyed out.
::: moniker-end
[!INCLUDEinstall_get_support_md]
See also
- Install Visual Studio
- Update Visual Studio
- Modify Visual Studio
- Uninstall Visual Studio
-
Вопрос
-
Подскажите, пожалуйста, есть ли возможность установки Visual Studio на другой диск. Стал устанавливать Visual Studio, при установке было написано: необходимо 8 Гб на всех дисках, установить на диск C:… Указал установить на диск D:… В
результате на диске D занято более 700 Мб, а на диске С не хватило места (было около 5 Гб) и установка прервалась. Очистил на диске С еще 3 Гб и продолжил установку. Программа встала на диске D занято более 750 Мб, а на диске С осталось около
400 Мб. Программа открылась на английском языке, для отображения на русском необходимо загрузить языковой пакет. Стал ставить языковой пакет, при установке было написано: необходимо 2 Гб на всех дисках. Запустил, но
установка не завершилась, так как на диске С не хватило места (осталось 160 Мб). Что-то еще убрать с диска С не хотелось бы, так как необходимо, но есть диск D на котором достаточно места (физически диски C и D — один диск). Есть ли
способ решить этот вопрос? Если есть, то как это сделать?
Ответы
-
Очень большая часть компонентов VS может установится только на диск с системой. Кроме того установка на другие диски по опыту других разработчиков приводит к массе проблем в будущем. Ну и в довесок. С таким
объемом свободного пространства на диске С, даже, если вы и установите VS на другой диск, работать нормально она не будет.
VB.Net — WPF, UWP
-
Предложено в качестве ответа
24 октября 2016 г. 12:57
-
Помечено в качестве ответа
Maksim MarinovMicrosoft contingent staff, Moderator
25 октября 2016 г. 7:24
-
Предложено в качестве ответа
-
Здравствуйте,
Вот блог по удалению:
Removing Visual Studio components left behind after an uninstall
Если Вам помог чей-либо ответ, пожалуйста, не забывайте жать на кнопку «Предложить как ответ» или «Проголосовать за полезное сообщение» Мнения, высказанные здесь, являются отражение моих личных взглядов, а не позиции
корпорации Microsoft. Вся информация предоставляется «как есть» без каких-либо гарантий.-
Помечено в качестве ответа
Vladislavvvv
25 октября 2016 г. 11:46
-
Помечено в качестве ответа
- Remove From My Forums
-
Question
-
i have been trying to install visual studio and the setup requires 34gb of space, my ssd has 25gb free. i have a second hard drive with 570gb free but visual studio wont let me change the installation path. so is there a way to fix this.
Answers
-
Hi James,
Thank you for posting in MSDN forum.
If you’ve installed pre-release versions of Visual Studio – or even another edition of the same release – you may find you can’t change the installation target directory. This is because once a set of shared components is installed, we install all the other
components to the same directory structure. When you have multiple editions installed, this save disk space since shared files occupy the same location on diskSolution
The general solution is to find the products that also installed these shared components and remove them. The example below is for Visual Studio 2015:
Warning: This will remove all components regardless of whether other products require them. This may cause other products to function incorrectly or not function at all.
- Download and install http://psmsi.codeplex.com. These are general-purpose PowerShell cmdlets I created for all sorts of development and troubleshooting operations for Windows Installer-based installs. You do not
need to elevate to install them, though if you pre-elevate you can install them per-machine (by default they are per-user). - Open an elevated PowerShell command prompt and run the following to discover which products have installed the key shared component:
get-msicomponentinfo '{777CBCAC-12AB-4A57-A753-4A7D23B484D3}' | get-msiproductinfo
- If you’re fine with uninstalling all the listed products (especially given that you’re probably going to install RTM next), run the following:
get-msicomponentinfo '{777CBCAC-12AB-4A57-A753-4A7D23B484D3}' | get-msiproductinfo | uninstall-msiproduct -properties IGNOREDEPENDENCIES=ALL
Please refer to:
https://blogs.msdn.microsoft.com/heaths/2015/07/14/how-to-install-visual-studio-to-another-directory-when-a-pre-release-is-installed/
Best Regards,
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey.-
Proposed as answer by
Wednesday, June 1, 2016 2:44 AM
-
Marked as answer by
宝宝徐
Monday, June 6, 2016 2:50 AM
- Download and install http://psmsi.codeplex.com. These are general-purpose PowerShell cmdlets I created for all sorts of development and troubleshooting operations for Windows Installer-based installs. You do not
- Remove From My Forums
-
Question
-
i have been trying to install visual studio and the setup requires 34gb of space, my ssd has 25gb free. i have a second hard drive with 570gb free but visual studio wont let me change the installation path. so is there a way to fix this.
Answers
-
Hi James,
Thank you for posting in MSDN forum.
If you’ve installed pre-release versions of Visual Studio – or even another edition of the same release – you may find you can’t change the installation target directory. This is because once a set of shared components is installed, we install all the other
components to the same directory structure. When you have multiple editions installed, this save disk space since shared files occupy the same location on diskSolution
The general solution is to find the products that also installed these shared components and remove them. The example below is for Visual Studio 2015:
Warning: This will remove all components regardless of whether other products require them. This may cause other products to function incorrectly or not function at all.
- Download and install http://psmsi.codeplex.com. These are general-purpose PowerShell cmdlets I created for all sorts of development and troubleshooting operations for Windows Installer-based installs. You do not
need to elevate to install them, though if you pre-elevate you can install them per-machine (by default they are per-user). - Open an elevated PowerShell command prompt and run the following to discover which products have installed the key shared component:
get-msicomponentinfo '{777CBCAC-12AB-4A57-A753-4A7D23B484D3}' | get-msiproductinfo
- If you’re fine with uninstalling all the listed products (especially given that you’re probably going to install RTM next), run the following:
get-msicomponentinfo '{777CBCAC-12AB-4A57-A753-4A7D23B484D3}' | get-msiproductinfo | uninstall-msiproduct -properties IGNOREDEPENDENCIES=ALL
Please refer to:
https://blogs.msdn.microsoft.com/heaths/2015/07/14/how-to-install-visual-studio-to-another-directory-when-a-pre-release-is-installed/
Best Regards,
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey.-
Proposed as answer by
Wednesday, June 1, 2016 2:44 AM
-
Marked as answer by
宝宝徐
Monday, June 6, 2016 2:50 AM
- Download and install http://psmsi.codeplex.com. These are general-purpose PowerShell cmdlets I created for all sorts of development and troubleshooting operations for Windows Installer-based installs. You do not
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:
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.
asked Aug 15, 2015 at 21:52
Bryan OleskyBryan Olesky
5791 gold badge4 silver badges8 bronze badges
1
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
answered Aug 15, 2015 at 22:04
miroxlavmiroxlav
11.6k5 gold badges56 silver badges99 bronze badges
12
Run installer in command line (Admin) with argument:
vs_community_ENU.exe /uninstall /force
Then:
vs_community_ENU /CustomInstallPath E:VisualStudio2015
WSBT
30.4k18 gold badges114 silver badges127 bronze badges
answered Jan 28, 2016 at 13:12
1
Use VirtualBox. Create a machine on the drive you wish. Enable guest aditions and activate seamless mode.
Benefits:
- The ENTIRE installation is on the second drive. will work even with a 32gb ssd. (This is the main selling point, considering that Visual studio with it’s additional features exceeds 30gb. If you have the GB to spare this solution is NOT the best for you)
- Uninstalling or backing up is a breeze. Just delete or move the image file. No system file conflicts and dirty registry in case of a corrupted installation.
Drawbacks:
- You need a LOT of ram. I use 4GB (out of
and 2 (out of 6) cores to run comfortably. Even so it is still slower than a normal installation.
- Will not work for applications with extensive 3d graphics. If you want to work with forms it’s fine but if you want to create a 3d game for android using say xamarin then forget it.
- Testing the program takes several seconds to compile (minutes for android apps). This may not seem much but during development these seconds do add up.
This is the solution i am using and am very happy with it but i am not your average professional programmer. I just create small windows form applications like file uploaders, chat apps etc. Try it out. It will take some time to setup but this experimentation isn’t risky.
answered May 28, 2016 at 19:34
PaulBPaulB
1,4142 gold badges15 silver badges32 bronze badges
0
After trying to manually uninstall, and then downloading another copy of the VS 2015 community installer for use with the force uninstall command line argument (Original answer by Michael Schuchardt), I was still unable to modify the install directory.
After testing further, I found that Unity (which integrates with Visual Studio as of Unity 5.2) also had to be removed. At this point Visual Studio Uninstaller (link to latest release on Github) can be used for the final removal of remaining any remaining components.
You will now be able to run the Visual Studio Installer and select a directory or, alternatively, run the install from command line using the «/CustomInstallPath …» argument.
answered Jul 1, 2016 at 17:22
islaneislane
931 silver badge5 bronze badges
1
I use Xamarin with Visual Studio, and I prefer to move only some large android to another directory with(copy these folders to destination before create hardlinks):
mklink J "C:UsersyourUser.android" "E:yourFolder.android"
mklink J "C:Program Files (x86)Android" "E:yourFolderAndroid"
answered Mar 28, 2017 at 14:59
FVVIDFVVID
1561 silver badge8 bronze badges
2
Anyone tried this approach?
Doing a dir /s vs_ultimate.exe
from the root prompt will find it. Mine was in <C:ProgramDataPackage Cache{[guid]}>
.
Once I navigated there and ran vs_community_ENU.exe /uninstall /force
it uninstalled all the Visual Studio assets I believe.
Got the advice from this post.
answered Oct 27, 2016 at 22:07
greggreg
1,04219 silver badges35 bronze badges
Uninstall the plugins first. And then try this.
This uninstaller worked like a charm (I didn’t even uninstall 2015 myself, it did everything on its own)!
answered Oct 10, 2020 at 14:05
SomeoneSomeone
352 silver badges7 bronze badges
У меня проблемы с установкой .NET Framework на неправильный диск. Некоторое время назад я опубликовал вопрос, который показывает, что инфраструктура .net устанавливается на мой A : drive вместо C: drive. Когда я снова собираюсь установить фреймворк, установщик Visual Studio заблокирует его на диске A :. Я переустановил установщик / фреймворк, и это не решило проблему. Есть ли способ изменить расположение фреймворка? Спасибо за помощь.
1 ответ
Вы установили VS IDE и общие компоненты, инструменты и SDK на диск A , и если вы хотите исправить это местоположение в C , необходимо удалить VS и удалить информацию об общем компоненте из редактора реестра . Это единственный способ осознать это.
Предложения
1) сначала удалите VS, а затем удалите это значение из редактора реестра .
Затем перезапустите программу vs_installer , и вы сможете выбрать нужный диск для ее установки.
2) Или вы можете запустить A:Program Files (x86)Microsoft Visual StudioInstallerresourcesapplayoutInstallCleanup.exe на своей стороне, эта программа удалит все версии VS2017 и VS2019 и удалит информацию. из редактора реестра одновременно. Если вас это не волнует, вы можете использовать это.
Когда вы его закончите, переустановите VS.
Обновить
Чтобы изменить путь установки VS IDE , вам нужно только удалить VS.
Чтобы изменить папку общего компонента , необходимо изменить ключ в редакторе реестра :
Если вы хотите изменить только папку общего компонента , обратите внимание на следующее:
Примечание :
Просто измените значение в редакторе реестра . Причина, по которой мы рекомендуем переустановить VS и удалить ключ вместе, заключается в том, что простое изменение ключа не приведет к сохранению файлов в новой папке. При переустановке VS компонент Shared просто помещается в новый файл. Это более формально.
Но простое изменение значения не имеет большого значения. Фактически, не удаляйте vs, чтобы в следующий раз при изменении или установке вы потратите больше времени на загрузку файлов в новую измененную папку.
Если вы также хотите изменить путь VS IDE , вам необходимо удалить этот ключ и переустановить, а не изменить его на новый путь в пользовательском интерфейсе VS_installer .
Рекомендуемый Microsoft путь к общей папке: C:Program Files (x86)Microsoft Visual StudioShared . Вы можете использовать это, если измените его.
Как установить Visual Studio 2015 на другой диск
Я пытаюсь выяснить, как установить Visual Studio Community 2015 на другой диск, кроме моего диска C:. Каждый раз, когда я открываю установщик VS, он показывает место сохранения, но не позволяет мне изменить его:
Я хочу изменить место загрузки на мой диск D:. Если есть работа, кто-нибудь может мне помочь? Я искал несколько часов, и я не могу найти ничего относящегося к моей проблеме.
7 ответов
запустите программу установки из командной строки с аргументом /CustomInstallPath InstallationDirectory
Примечание: это не изменит местоположение всех файлов, но только тех, которые можете быть (по дизайну) установлен на другое место. предупредил что есть много общих компонентов, которые будут установлены в общей хранилища на диске C: без какой-либо возможности изменить свой путь (если вы не какой-нибудь взлома используя mklink /j (соединение каталогов, т. е. «жесткая ссылка для папки»), но сомнительно, стоит ли это, потому что любые обновления Visual Studio нарушат эти жесткие ссылки. Это подтвердил людьми, которые пробовали это, хотя на Visual Studio 2012.)
обновление: за последние комментарий, удаление Visual Studio может потребоваться относится. Команда удаления выглядит так: vs_community_ENU.exe /uninstall /force
запустите программу установки в командной строке (Admin) с аргументом:
vs_community_ENU.exe /uninstall /force
vs_community_ENU /CustomInstallPath E:VisualStudio2015
Используйте VirtualBox. Создайте машину на диске, который вы хотите. Включить гостевые объявления и активировать бесшовный режим.
- вся установка находится на втором диске. будет работать даже с 32GB ssd. (Это основной пункт продажи, учитывая, что Visual studio с его дополнительными функциями превышает 30 Гб. Если у вас есть ГБ, чтобы сэкономить это решение не самое лучшее для вас)
- удаление или резервное копирование-это ветер. Просто удалить или переместите файл изображения. Нет конфликтов системных файлов и грязного реестра в случае поврежденной установки.
- вам нужно много ОЗУ. Я использую 4GB (из
и 2 (из 6) ядра для комфортного запуска. Тем не менее, это все еще медленнее, чем обычная установка.
- не будет работать для приложений с обширной 3d-графикой. Если вы хотите работать с формами, это нормально, но если вы хотите создать 3d-игру для android, используя say xamarin, то забудь это.
- тестирование программы занимает несколько секунд для компиляции (минуты для приложений android). Это может показаться немного, но во время разработки эти секунды складываются.
Это решение, которое я использую, и я очень доволен им, но я не ваш средний профессиональный программист. Я просто создаю небольшие приложения Windows form, такие как загрузчики файлов, чат-приложения и т. д. Попробовать ее. Это займет некоторое время, чтобы настроить, но этот эксперимент не является рискованным.
после попытки вручную удалить, а затем загрузить другую копию установщика сообщества VS 2015 для использования с аргументом командной строки force uninstall ( оригинальный ответ Михаэля Шухардта), Я все еще не смог изменить каталог установки.
после дальнейшего тестирования я обнаружил, что Unity (который интегрируется с Visual Studio с Unity 5.2) также необходимо удалить. На данный момент Visual Studio Uninstaller (ссылка на последнюю версию На GitHub) может использоваться для окончательного удаления оставшихся любых оставшихся компонентов.
теперь вы сможете запустить установщик Visual Studio и выбрать каталог или, в качестве альтернативы, запустить установку из командной строки с помощью «/CustomInstallPath . » аргумент.
Я использую Xamarin с Visual Studio, и я предпочитаю перемещать только некоторые большие android в другой каталог с (скопируйте эти папки в пункт назначения перед созданием жестких ссылок):
Я нашел эти две ссылки, которые могут помочь вам:
в основном, по крайней мере часть должна быть установлена на системном диске. Я не уверен, что ваш D: соответствует некоторым внешним диск или фактический системный диск, но решение символической ссылки может помочь.
Как изменить путь установки Visual Studio 2019?
Здравствуйте, решил установить VisualStudio Community 2019, но заметил, что нельзя перенести путь установки полностью, а только часть всех компонентов VS
выглядит это в инсталяторе примерно так.
- Вопрос задан более трёх лет назад
- 953 просмотра
- Вконтакте
- Вконтакте
У меня при первичной установке можно выбрать другой диск, однако он всё равно говорит что на диске C: недостаточно места
106 / 94 / 66 Регистрация: 21.04.2014 Сообщений: 1,338 |
|
1 |
|
VS 2017 16.09.2017, 15:03. Показов 38097. Ответов 7
Здравствуйте. Миниатюры
0 |
2 / 2 / 0 Регистрация: 12.09.2017 Сообщений: 23 |
|
27.09.2017, 23:43 |
2 |
В самом низу есть строка с птутём, немного правее три точки, нажми на них и выбирай путь
0 |
3225 / 2484 / 429 Регистрация: 03.05.2011 Сообщений: 5,158 Записей в блоге: 21 |
|
03.10.2017, 20:01 |
3 |
Решение
Набралось более чем на 38 гб. Но почему-то на выбранной мною диск установится лишь 4.33 гб, а остальное всё равно хочет устанавливаться на диск С. остальное это компоненты системы — либы, библиотеки, дрова, sdk и прочее, которое по умолчанию должно ставиться в системные папки. Если устанавливать эти файлы в другую папку, то толку от них не будет, они просто будут болтаться мертвым грузом. Не по теме:
В самом низу есть строка с птутём, немного правее три точки, нажми на них и выбирай путь а он по твоему куда устанавливает?
1 |
106 / 94 / 66 Регистрация: 21.04.2014 Сообщений: 1,338 |
|
03.10.2017, 20:06 [ТС] |
4 |
_lunar_, ну т.е. тут без вариантов и мне придётся освобождать диск C? Ясно, благодарю.
0 |
3225 / 2484 / 429 Регистрация: 03.05.2011 Сообщений: 5,158 Записей в блоге: 21 |
|
03.10.2017, 20:12 |
5 |
придётся освобождать диск C? скорее всего да. вариантов 3:
0 |
11 / 10 / 7 Регистрация: 07.05.2013 Сообщений: 248 |
|
05.02.2018, 10:52 |
6 |
можно было через консоль запустить установщик с параметром и выбрать путь и все установить на диск Д. сам так давно делал, думал здесь найду
0 |
7 / 4 / 3 Регистрация: 22.10.2018 Сообщений: 8 |
|
22.10.2018, 14:11 |
7 |
Можно еще переместить всё на другой диск и сделать ссылки на эти папки. Правда придется временно освободить место на диске С, чтобы эта чудо(VS) установилась, а потом бегать по всё системе и искать её потроха.
1 |
101 / 53 / 21 Регистрация: 20.12.2009 Сообщений: 1,127 |
|
25.04.2021, 19:01 |
8 |
ни у кого не получалось установить VS целиком на не системный диск Поменялось ли чтонубить за это время?
0 |
IT_Exp Эксперт 87844 / 49110 / 22898 Регистрация: 17.06.2006 Сообщений: 92,604 |
25.04.2021, 19:01 |
8 |