34

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

Nikolay Arhangelov
  • 1,292
  • 3
  • 13
  • 21

4 Answers4

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.

Tiago Ávila
  • 2,737
  • 1
  • 31
  • 34
  • 1
    After I hit the 1st Modify button, I don't see a Modify button in the dialog that opens unless I actually make changes to the installed components – Cocowalla Sep 19 '18 at 07:01
  • Just got a BSOD during a VSIX installation and my Visual Studio installation got corrupted. This was the fastest way to solve it - thanks. – joakimriedel Feb 11 '19 at 09:10
  • This worked for me when I ran the "Installer".......but ran it "As Administrator". – granadaCoder Jul 26 '19 at 07:07
12

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
Jean-François Fabre
  • 137,073
  • 23
  • 153
  • 219
Hodza
  • 3,118
  • 26
  • 20
  • in new VS versions vs_installer.exe no longer exists... Now you can just **run the cleanup executable and reinstall VS.** this is the only solution if **visual studio installer no longer opens**, mine was always crashing, this is mostly due to **broken MSi or .NET packages** – Kuza Grave Nov 06 '20 at 11:02
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.

-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.

Ken Tucker
  • 4,126
  • 1
  • 18
  • 24
  • 4
    The installer does not detect the existing installation and only shows Install, no Modify and Launch options. The dots are also missing. – Nikolay Arhangelov Apr 18 '17 at 09:17
  • 3
    try using the visual studio uninstaller on GitHub to remove visual studio 2017 and then reinstall it https://github.com/Microsoft/VisualStudioUninstaller – Ken Tucker Apr 18 '17 at 12:57
  • Thanks for the tip on the tool. It detects the following versions and I don't see 2017 listed: Microsoft Visual Studio Ultimate 2013, Visual Studio 2013 Update 5, Microsoft Visual Studio Enterprise 2015, Visual Studio 2015 Update 3. – Nikolay Arhangelov Apr 18 '17 at 15:10