Visual Studio 2017 损坏且无法卸载或修复

问题描述:

我在启动 Visual Studio 2017 Enterprise 时遇到问题,我无法向 Microsoft 的 开发者社区,因为它需要运行 Visual Studio 2017.废话!

I am having an issue with starting Visual Studio 2017 Enterprise and I cannot report a problem to Microsoft's Developer Commnuity because it requires running Visual Studio 2017. Crap!

我正在使用本周的更新来更新 VS 2017,在此期间我的电脑崩溃了,我不得不重新启动它.

I was updating VS 2017 with an update from this week and during this my PC crashed and I had to reboot it.

现在,当我启动 VS 2017 时,我收到以下消息:

Now when I start VS 2017 I get the following message:

此 Visual Studio 安装的设置未完成.请再次运行 Visual Studio 安装程序以更正问题.

The setup for this installation of Visual Studio is not complete. Please run the Visual Studio Installer again to correct the issue.

我运行了安装程序,但没有检测到安装的任何版本.

I ran the installer and it didn't detect any version installed.

我尝试了一些来自 VS 社区的命令,例如:

I tried some commands from the VS community like:

%programfiles(x86)%\Microsoft Visual Studio\Installer\resources\app\layout\InstallCleanup.exe -full

这个命令清理了一些东西,但结果是一样的.我无法删除损坏的安装.

This command cleaned some stuff, but the result was the same. I cannot remove the corrupted installation.

我也无法安装任何其他 VS 2017 版本 - 我收到以下错误:

I also can't install any other VS 2017 edition - I get the following error:

[4068:000d][2017-04-12T20:13:20] Error 0x80004003:
   at Microsoft.VisualStudio.Setup.Cache.InstanceRepository.GetInstance()
   at Microsoft.VisualStudio.Setup.Cache.CacheRepository.<GetInstances>d__27.MoveNext()
   at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable`1 source, Func`2 predicate)
   at Microsoft.VisualStudio.Setup.Engine.VerifyInstallationPath(IServiceProvider services, String installationPath, IInstance instance, IQuery query)
   at Microsoft.VisualStudio.Setup.Engine.Install(Product product, String destination, CancellationToken token)Object reference not set to an instance of an object.

我现在被一个坏掉的 Visual Studio 2017 困住了,它无法运行,我无法发布到社区,因为这是通过 Visual Studio 2017 完成的.

I'm now stuck with a broken Visual Studio 2017, which doesn't run and I can't post to the community, because this is done through Visual Studio 2017.

有人可以为此提出解决方法吗?

Can anyone suggest a workaround for this?

谢谢!

回答

我设法在这篇文章中找到了解决此问题的方法:VS 2017 RC 安装过程中出现错误 0x80004003

I managed to find a fix for this issue in this post: Error 0x80004003 during VS 2017 RC install

我打开 Visual Studio 2017 安装程序,单击修改",在打开的窗口中,我再次单击修改",没有任何更改.它对我有用,我使用的是 Visual Studio 2017 Enterprise.

I opened the Visual Studio 2017 Installer, clicked in Modify and in the window that open, I just clicked in Modify again, without any changes. It worked for me, I'm using Visual Studio 2017 Enterprise.