Visual Studio 2017 Broken and Cannot Uninstall or Repair

33

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!

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

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

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.

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.

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.

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?

Thanks!

Answer

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

visual-studio-2017
asked on Stack Overflow Apr 12, 2017 by Nikolay Arhangelov • edited May 23, 2017 by Nikolay Arhangelov

4 Answers

63

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.

answered on Stack Overflow Jan 23, 2018 by Tiago Ávila • edited Mar 16, 2018 by Tiago Ávila
11

Do not try this solution before trying others as the first step just deletes everything in the directory C:\Program Files (x86)\Microsoft Visual Studio\2017\

The only solution which worked for me was:

  1. run C:\Program Files (x86)\Microsoft Visual Studio\Installer\resources\app\layout\InstallCleanup.exe -full

  2. run C:\Program Files (x86)\Microsoft Visual Studio\Installer\vs_installer.exe with admin rights

  3. click modify and add some option
answered on Stack Overflow Sep 4, 2017 by Hodza • edited Jun 13, 2019 by Jean-François Fabre
0

I had the same issue VS2017 ENTERPRISE VERSION 15.2 (26430.16) RELEASE I opened VS2015 which I also had installed and closed it. I was then able to open vs2017 without issue. VS2017 had worked for weeks without issue and no updates were applied in the interim so exactly what caused the problem is unclear.

answered on Stack Overflow Sep 7, 2017 by user8574792
-2

Open the visual studio 2017 installer. If you press on the dots next to the modify and launch buttons you see an option to repair.

answered on Stack Overflow Apr 12, 2017 by Ken Tucker

User contributions licensed under CC BY-SA 3.0