Visual studio installer как изменить целевой диск

This repo is the home of the official Visual Studio, Visual Studio for Mac, Visual Studio Subscriptions, and Scripting Technologies documentation for Microsoft. - visualstudio-docs/change-installat...
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

change installation locations for Visual Studio

select an installation location for Visual Studio files

move installation files to different drives

use the D drive

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″

  1. When you install Visual Studio, choose the Installation locations tab.

    Screenshot showing the Installation locations tab of the Visual Studio Installer.

  2. 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.

  3. 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.

  4. 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″

  1. 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.»:::

  2. 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.

  3. 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.

  4. 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

RRS feed

  • Remove From My Forums
  • Question

  • Hi,

    I have VS 2017 installed on my C drive (windows 10). I would like to know if I can install VS 2019 on another drive (T) without headache?

    Best Regards.

All replies

  • Hi raysefo,

    Welcome to the MSDN forum.

    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. But as same as VS 2017, 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.

    So you can choose D/F drive as a default installation location via VS installer as I shown below:

    more rules, see:
    https://docs.microsoft.com/en-us/visualstudio/install/change-installation-locations?view=vs-2019
    .

    please give me a feedback if it is helpful for you.

    Sincerely

    May


    MSDN Community Support Please remember to click «Mark as Answer» the responses that resolved your issue, and to click «Unmark as Answer» if not. This can be beneficial to other community members reading this thread. If you have any
    compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com

    • Proposed as answer by

      Tuesday, April 16, 2019 2:03 AM

  • Hi May,

    Thank you for your reply. I would like to install VS 2019 enterprise or professional and
    specifically core and Xamarin. How much space should I have on my C drive? Since I have VS 2017 Enterprise is installed on C drive, there have to be common tools so it should take less space I
    guess hopefully :)

    • Edited by
      raysefo
      Thursday, April 11, 2019 10:45 AM

  • Hi raysefo,

    Sorry for the reply delays,

    You can check the specific space that these workloads could be required in lower right corner of window. if you has changed the installation location, there would be shown you  automatically
    how much space that a part of components which alternative stored and required in a custom drive. Please see the screenshot I shared below:

    So you can repro my step to check the space required actually in C drive.

    Please feel free t to let me know if it unblock to you
    J

    Sincerely

    May


    MSDN Community Support Please remember to click «Mark as Answer» the responses that resolved your issue, and to click «Unmark as Answer» if not. This can be beneficial to other community members reading this thread. If you have any
    compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com

    • Proposed as answer by
      May Luo-MSFT
      Tuesday, April 16, 2019 2:03 AM

  • Hi
    raysefo

    Is there any update for this? 
    I wondering if my workaround is helpful or not. We are also excepted your reply with newer progress for that.

    May


    MSDN Community Support Please remember to click «Mark as Answer» the responses that resolved your issue, and to click «Unmark as Answer» if not. This can be beneficial to other community members reading this thread. If you have any
    compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com

RRS feed

  • Remove From My Forums
  • Question

  • Hi,

    I have VS 2017 installed on my C drive (windows 10). I would like to know if I can install VS 2019 on another drive (T) without headache?

    Best Regards.

All replies

  • Hi raysefo,

    Welcome to the MSDN forum.

    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. But as same as VS 2017, 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.

    So you can choose D/F drive as a default installation location via VS installer as I shown below:

    more rules, see:
    https://docs.microsoft.com/en-us/visualstudio/install/change-installation-locations?view=vs-2019
    .

    please give me a feedback if it is helpful for you.

    Sincerely

    May


    MSDN Community Support Please remember to click «Mark as Answer» the responses that resolved your issue, and to click «Unmark as Answer» if not. This can be beneficial to other community members reading this thread. If you have any
    compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com

    • Proposed as answer by

      Tuesday, April 16, 2019 2:03 AM

  • Hi May,

    Thank you for your reply. I would like to install VS 2019 enterprise or professional and
    specifically core and Xamarin. How much space should I have on my C drive? Since I have VS 2017 Enterprise is installed on C drive, there have to be common tools so it should take less space I
    guess hopefully :)

    • Edited by
      raysefo
      Thursday, April 11, 2019 10:45 AM

  • Hi raysefo,

    Sorry for the reply delays,

    You can check the specific space that these workloads could be required in lower right corner of window. if you has changed the installation location, there would be shown you  automatically
    how much space that a part of components which alternative stored and required in a custom drive. Please see the screenshot I shared below:

    So you can repro my step to check the space required actually in C drive.

    Please feel free t to let me know if it unblock to you
    J

    Sincerely

    May


    MSDN Community Support Please remember to click «Mark as Answer» the responses that resolved your issue, and to click «Unmark as Answer» if not. This can be beneficial to other community members reading this thread. If you have any
    compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com

    • Proposed as answer by
      May Luo-MSFT
      Tuesday, April 16, 2019 2:03 AM

  • Hi
    raysefo

    Is there any update for this? 
    I wondering if my workaround is helpful or not. We are also excepted your reply with newer progress for that.

    May


    MSDN Community Support Please remember to click «Mark as Answer» the responses that resolved your issue, and to click «Unmark as Answer» if not. This can be beneficial to other community members reading this thread. If you have any
    compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com

5 / 4 / 1

Регистрация: 19.11.2018

Сообщений: 36

1

VS 2019

12.05.2019, 21:29. Показов 23671. Ответов 5


Здравствуйте! Столкнулся недавно с одной проблемой: в Visual Studio 2019 Installer, когда я хочу установить Visual Studio 2019 Professional, захожу во вкалдку «Расположения установки», я вижу, что в «Общие компоненты, инструменты, и пакты SDK» указан путь, которого у меня нет вовсе. У меня нет диска «E». Как изменить его? Прилагаю скриншот проблемы ниже.

Миниатюры

Как изменить путь расположения установки общих компонентов, инструментов, и пакетов SDK?
 

__________________
Помощь в написании контрольных, курсовых и дипломных работ, диссертаций здесь



0



0 / 0 / 0

Регистрация: 02.04.2019

Сообщений: 1

08.07.2019, 08:45

2

Удали всё связанное с Visual Studio(в реестре тоже). Мне помогло.



0



0 / 0 / 0

Регистрация: 24.11.2014

Сообщений: 21

19.07.2019, 08:16

3

Для того чтобы эти поля стали изменяемыми, необходимо через Visual Studio Installer (то, что изображено на скриншоте) удалить имеющуюся редакцию студии. При повтороной установке данные поля можно будет изменить.



0



0 / 0 / 0

Регистрация: 23.08.2019

Сообщений: 7

23.08.2019, 12:02

4

alivedeath, а как это собственно сделать



0



3 / 3 / 0

Регистрация: 19.02.2020

Сообщений: 1

19.02.2020, 20:08

5

В редакторе реестра есть соответствующий параметр «SharedInstallationPath» по пути: HKEY_LOCAL_MACHINESOFTWAREMicrosoftVisualStudio Setup . Меняешь значение параметра на путь, который тебе нужен и все.



3



0 / 0 / 0

Регистрация: 16.10.2021

Сообщений: 3

05.11.2021, 16:28

6

Спасибо



0



У меня проблемы с установкой .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.

Чтобы изменить папку общего компонента , необходимо изменить ключ в редакторе реестра :

enter image description here

Если вы хотите изменить только папку общего компонента , обратите внимание на следующее:

Примечание :

Просто измените значение в редакторе реестра . Причина, по которой мы рекомендуем переустановить 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, он показывает место сохранения, но не позволяет мне изменить его:

visual studio install dialog with inactive path for install location

Я хочу изменить место загрузки на мой диск 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 (из 8) и 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
выглядит это в инсталяторе примерно так.
image.png

  • Вопрос задан более трёх лет назад
  • 953 просмотра
  • Facebook
  • Вконтакте
  • Twitter

mindtester

RlUOSvY.png

  • Facebook
  • Вконтакте
  • Twitter

MrKarton

У меня при первичной установке можно выбрать другой диск, однако он всё равно говорит что на диске C: недостаточно места
5e010ea8c2beb676184336.jpeg

Понравилась статья? Поделить с друзьями:
  • Vipnet client срок действия лицензии на данную программу закончился как исправить
  • Vipnet client ошибка запуска сервиса управления драйвером
  • Visual studio git failed with a fatal error authentication failed for
  • Vipnet cannot extract files with error 1000
  • Visual studio fatal error lnk1120