Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio 2017 Broken and Cannot Uninstall or Repair [duplicate]

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

like image 945
Nikolay Arhangelov Avatar asked Apr 12 '17 17:04

Nikolay Arhangelov


People also ask

Why can't I uninstall Microsoft Visual Studio?

If you experience a catastrophic error and can't repair or uninstall Visual Studio, you can run the InstallCleanup.exe tool to remove installation files and product information for all installed instances of Visual Studio 2017, Visual Studio 2019, or Visual Studio 2022.

How do I completely reinstall Visual Studio?

Find the Visual Studio Installer on your computer. From the Start menu in Windows, search for "installer", and then select Visual Studio Installer from the results. You might be prompted to update the Visual Studio Installer before continuing. If so, follow the prompts.


1 Answers

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.

like image 106
Tiago Ávila Avatar answered Sep 20 '22 19:09

Tiago Ávila