Как установить visual studio на другой диск
Перейти к содержимому

Как установить visual studio на другой диск

  • автор:

Change Visual Studio installation folder after install

I’m running out of space on the partition that has Visual Studio installed. It’s safe to copy the installation in another partition?

4 Answers 4

You could move the files to the new location (manually) and then use Junction (http://technet.microsoft.com/en-us/sysinternals/bb896768.aspx) to create a link back. I did that with 2012 and it seems to be working for me.

Tom's user avatar

Without having tried I bet this isn’t possible.

Installation folders are typically stored in many places such as config files and the registry. After moving, all these references will still point to the old and now invalid location. And, even worse, moving the folder will also break any installation / uninstallation / update routines which means that you will no longer be able to install patches and service packs.

Conclusion: You are way better off uninstalling Visual Studio and moving it to the new location. It takes only a short time as compared to the headache that you would end up otherwise.

(Or, if you don’t like to do that you can of course still mount a new partition to the program files folder to increase disc space or get a larger hard drive)

Как установить visual studio на другой диск

Gray Pipe

Этот форум закрыт. Благодарим вас за ваш вклад. Если вам нужна дополнительная информация о том, где еще можно найти помощь, вы можете посетить страницу ресурсов.

Лучший отвечающий

Вопрос

Ответы

  • Предложено в качестве ответа Maksim Marinov Microsoft contingent staff, Moderator 24 октября 2016 г. 12:57
  • Помечено в качестве ответа Maksim Marinov Microsoft contingent staff, Moderator 25 октября 2016 г. 7:24

Если Вам помог чей-либо ответ, пожалуйста, не забывайте жать на кнопку "Предложить как ответ" или "Проголосовать за полезное сообщение" Мнения, высказанные здесь, являются отражение моих личных взглядов, а не позиции корпорации Microsoft. Вся информация предоставляется "как есть" без каких-либо гарантий.

  • Помечено в качестве ответа Vladislavvvv 25 октября 2016 г. 11:46

Все ответы

  • Предложено в качестве ответа Maksim Marinov Microsoft contingent staff, Moderator 24 октября 2016 г. 12:57
  • Помечено в качестве ответа Maksim Marinov Microsoft contingent staff, Moderator 25 октября 2016 г. 7:24

Если Вам помог чей-либо ответ, пожалуйста, не забывайте жать на кнопку "Предложить как ответ" или "Проголосовать за полезное сообщение" Мнения, высказанные здесь, являются отражение моих личных взглядов, а не позиции корпорации Microsoft. Вся информация предоставляется "как есть" без каких-либо гарантий.

  • Помечено в качестве ответа Vladislavvvv 25 октября 2016 г. 11:46

Звучит как магия, как так удаляли, а место свободное уменшилось. Но если честно сказать всегда лучшим методом переустановки VS, является новая установка на чистую ОС.

Если Вам помог чей-либо ответ, пожалуйста, не забывайте жать на кнопку "Предложить как ответ" или "Проголосовать за полезное сообщение" Мнения, высказанные здесь, являются отражение моих личных взглядов, а не позиции корпорации Microsoft. Вся информация предоставляется "как есть" без каких-либо гарантий.

Move Visual Studio 2022 to Another Drive after Installation without Reinstalling

A couple of months back, most probably in November last year, I had to install Microsoft Visual Studio on a drive(D) other than C because my C drive did not have enough space to host the software. Two weeks ago I cleaned up my C drive and now I want to move the Visual Studio installation to the C drive because the C drive is located on an SSD drive, and the other drives are on HDD.

vs-ent-2022-installation-location

The Microsoft Official Document reference says that I have to reinstall my Visual Studio. But always there are some exceptional experiences for the users other than the official documentation statements.

ms-doc-ref

One very important cause for my avoiding this reinstallation is, that I live in such a corner of the globe where 30GB will take me like 3 to 4 days to download. Moreover, it will also hamper regular tasks and the custom settings and tweaks I have applied to my development environment.

That’s why I am writing this to avail community help if anyone has ever experienced such an issue and solved it anyhow.

Installing Visual Studio on a different drive

Marcos Placona

I’ve got a pro license of Visual Studio 2012, and decided to install it instead of my existing VS 2010 Express install.

Because I didn’t actually have anything very important on my current install, I decided to uninstall my current VS 2010. When I originally installed it, I made sure it got installed on my E:\ drive. To give you a bit of context on my setup, I’ve got an SSD as a boot drive ( C:\ ) and a specific drive ( E:\ ) which I use to install all my programs. I find it helps me backing up my stuff, as well as “separating concerns”, since my boot drive is only used for… well booting ��

I then set off about installing VS2012, and the first screen I was presented with was where you actually define where your install is going to go. So I just change the drive letter to be E:\ instead of C:\ .

To my surprise, this is what I saw in the next screen:

VS2012 Install screen

VS2012 Installation screen

“No good!”, it still wants to use over 2Gb of my C:\ drive, even though I told it to only use my E:\ drive.

After a bit of Googling, it it turns out more people have had this same problem, and there’s even been a blog post on MSDN about it. While there’s been some conversation on the comments in the blog post aforementioned, none one really seems to have come up with a decent (or at least temporarily decent) solution to the problem.

So here’s a “temporarily decent” solution to this problem:

Simply create a SymLink from the folder where VS “wants” to be installed, to the folder where “you” want to install it. This way, you “trick” the installer to think it’s being installed on the system drive, but is is in reality installing it to the drive you defined on your symlink.

Think of it as a shortcut to a folder deeply nested within your file system. You can have it sitting on your desktop, but when you actually open it, you will find that the path to it is something like <letter>\my\deeply\nested\directory .

So in order to do that, all you will need to do is the following:

  1. Open command line as an administrator (you can type “cmd” and right click on it to run as admin)
  2. Enter mklink /J «C:\Program Files (x86)\Microsoft Visual Studio 11.0» «E:\Program Files (x86)\Microsoft Visual Studio 11.0»
    1. Where the J flag indicates you’re creating a directory junction (see more here)
    2. The first path is where VS is trying to install itself
    3. The second path is where you want it to be installed

    You will now notice the whole of it (except for things it adds to the registry) will have been installed on your preferred drive.

    Q: Why are you calling your solution “temporarily decent”? It seems perfect.

    A: It turns out that when you install any updates to VS, they will end up in your system drive, since VS updates don’t “understand” symlinks, and in fact remove them.

    Q: And you only say that now? What do I do then?

    A: A comment added to this answer on StackOverflow seem to imply that you can do the update, and then merge your files manually by copying them into your other drive. You will need to re-create the symlink after that, but considering you don’t get udpates every day, it’s probably worth.

    Q: Will this be a problem for ever?

    A: By the looks of it, yes! If you read the blog post I linked above, MS seems to think that’s the way to go now, and you should have bigger drives if you wanted to have to avoid this whole workaround.

Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *