5

I'm having issues with the .net framework being installed to the wrong drive. I posted a question a while ago that shows the .net framework is installing to my A: drive instead of C: drive. When I go to install the framework again, the visual studio installer has it locked to the A: drive. I have reinstalled the installer / framework and that does not fix the issue. Is there a way to change the framework location? Thanks for the help.locked to A: drive

4
  • What is that A: drive? USB? My first thought would be to uninstall the problem packages, then log in with a new admin user account and install fresh using that account. I doubt that would be problem free though. What else is on A:? Commented Nov 7, 2020 at 23:35
  • A: is the other hard drive with photos, games, and other stuff like that. Commented Nov 7, 2020 at 23:56
  • I was kind of curious since it says the drive will make Visual Studio perform worse. Commented Nov 8, 2020 at 0:36
  • That is because A: is an HDD while C: is an SSD Commented Nov 8, 2020 at 1:01

2 Answers 2

4

You have installed the VS IDE and shared components, tools and SDKs on A drive and if you want to fix this location into C drive, you have to uninstall VS and delete the shared component info from the Registry Editor. That is the only way to realize it.

Suggestions

1) first uninstall VS and then delete this value from Registry Editor

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\Setup\SharedInstallationPath 

Then, rerun vs_installer program and you can select the right disk to install it.

2) Or, you can run A:\Program Files (x86)\Microsoft Visual Studio\Installer\resources\app\layout\InstallCleanup.exe in your side, this program will uninstall all VS2017 and VS2019 versions and delete the info from Registry Editor at the same time. If you do not care about that, you can use it.

When you finish it, you should reinstall VS.

Update

To change VS IDE installation path, you only have to uninstall VS.

To change the shared component folder, you have to modify the key from the Registry Editor:

enter image description here

==================================================

If you only want to change the shared component folder, you should note that:

Note:

You just modify the value under registry editor. The reason we recommend that you reinstall VS and remove the key together is that simply changing the key will not store the files to a new folder. Reinstalling VS will simply put the Shared component into the new file. That is more formal.

But simply changing the value does not make much difference. In fact, do not uninstall vs so that you will spend more time downloading the files to the new changed folder next time you change or install.

=================================================

If you also want to change the VS IDE path, you have to delete that key and reinstall vs. And change to new path under the VS_installer UI.

The Microsoft' recommended shared folder path is C:\Program Files (x86)\Microsoft Visual Studio\Shared. You can use this if you change it.

Sign up to request clarification or add additional context in comments.

5 Comments

I was able to delete the value from the registry editor, and I'm able to change the install location! However, now I don't know where to install the shared components so the .net framework functions correctly. Thanks for your help.
For VS IDE, you should reinstall VS to change the install path. But for shared components, you should enter the registry editor to modify that value to change the path. And if you only wan to change the registry editor, you just modify the value under registry editor. The reason we recommend that you reinstall VS and remove the key together is that simply changing the key will not store the files to a new folder. Reinstalling VS will simply put the Shared component into the new file. That is more formal.
In fact, do not uninstall vs so that you will spend more time downloading the files to the new changed folder next time you change or install. If you also want to change the VS IDE path, you have to delete that key and reinstall vs. And change to new path under the vs_installer UI.
The Microsoft' recommended shared folder path is C:\Program Files (x86)\Microsoft Visual Studio\Shared. You can use this if you change it.
Making a mistake when editing the registry can break your system. Microsoft should really fix this.
3

To clarify the above answer (I had trouble following it),

1. The default location of shared component (SDK etc.) can be changed by changing the registry value at -

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\Setup\SharedInstallationPath

enter image description here

here change the registry value to where you want to put shared SDK components.

2. For changing IDE and download cache location -

uninstall (if any) already installed visual studio community(/enterprise etc.) installation.

And then next time when you install it will ask for components to install. In the dialog window make changes to installation location tab.

enter image description here

2 Comments

I don't seem to have a SharedInstallationPath ?
is visual studio installer err...installed? Also when checking in registry, the path of hive would be Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\Setup in which you will find SharedInstallationPath.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.