onmyway
onmyway

Reputation: 1515

Visual Studio 2017 Cannot Modify - Restart Required

I have been trying to update and modify my Visual Studio 2017 for 2 days now, but each time I run the Visual Studio Installer, I get this message:

"A restart is required. If needed, any remaining setup will resume after the restart."

Obviously I restarted about 10 times...

Any idea what I must delete where to get rid of any temp garbage that is hindering my attempts to modify my installation?

Upvotes: 5

Views: 2389

Answers (3)

alter_igel
alter_igel

Reputation: 7212

I encountered the same issue while installing Visual Studio 2019. I tried the PowerShell script proposed by @onmyway, to no avail.

Naturally, as with any simple problem in Windows, the fix is to manually edit the Windows Registry 🙄

It appears the installation may leave some stale keys behind. Remove the following keys from the registry according to your platform:

32Bit: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\Setup\Reboot

64Bit: HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\VisualStudio\Setup\Reboot

This immediately fixed my installation, and Visual Studio 2019 was able to start without further rebooting. I cannot promise that this will fix the issue for VS2017 users, but I leave this here for future readers.

Credit goes to Matt Cavallari from this forum thread.

Upvotes: 4

onmyway
onmyway

Reputation: 1515

I eventually found a working solution!

It is a script one runs with PowerShell, that resets the state.

So, for anyone else with the same issue, I hope this helps:

https://gist.github.com/heaths/1d0658c6903871e09b72395c9ab44db1#file-reset-instancestate-ps1

Upvotes: 1

Paddler
Paddler

Reputation: 111

It seems that you've stopped the setup in half-way as same thing happened to me when I stopped the setup in half way. So I uninstalled the download and started downloading component by component which worked.

Upvotes: 0

Related Questions