Visual Studio 2017 Cannot Modify - Restart Required

橙三吉。 提交于 2021-02-09 02:48:56

问题


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?


回答1:


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.




回答2:


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




回答3:


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.



来源:https://stackoverflow.com/questions/42849942/visual-studio-2017-cannot-modify-restart-required

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!