问题
My Win 10 version of Visual Studio 2015 Community edition failed to load with error "cannot find one or more components .Please reinstall the application".
I've tried repairing it but received nondescript errors so cancelled the repair (which also reported similar errors and eventually that 116 out 120 components had been repaired - iirc).
I then tried an uninstall, but that crashed windows.
On reboot, the VS 2015 uninstall options screen was displayed. Tried uninstall again but progress bar wasn't moving. Successfully cancelled it.
How do I get a working copy of VS 2015 running again (without breaking anything else on my machine)? Can I reinstall a new copy over the top of the old one?
Thanks in advance.
回答1:
Before you perform the reinstall, you need to completely uninstall the VS community 2015 and provides 2 uninstall methods as below:
- Forcibly uninstall command to remove:
• Run the command executable file /uninstall /force like vs_community.exe /uninstall /force in the elevated command prompt. What’s more, you can see here.
• Reboot the computer
• Rename or delete folders-
C:\Program Files (x86)\Microsoft Visual Studio 14.0
C:\Program Files\Microsoft Visual Studio 14.0
C:\users\user\Documents\Visual Studio 2015
C:\users\user\AppData\Roaming\Microsoft\VisualStudio\14.0
C:\users\user\AppData\Local\Microsoft\VisualStudio\14.0
C:\users\user\AppData\Local\Microsoft\VSCommon\14.0
• Go to the registry editor (start >> run >> regedit) and remove/rename the following registries-
a. HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\14.0
b. HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\14.0
c. HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\14.0
d. HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\14.0_Config
- The Visual Studio Uninstaller tool: https://github.com/Microsoft/VisualStudioUninstaller/releases.
Before the next installation, make sure windows update is up-to-date, temporarily disable any antivirus software and clean up the %temp% folder, use a healthy ISO file of VS community 2015 with update 3 to install, run the installer as administrator.
来源:https://stackoverflow.com/questions/41747780/reinstall-visual-studio-2015