BigBang1112
BigBang1112

Reputation: 133

Can't install Visual Studio - stuck on Visual Studio Hub Services

Now I have some big problems with installing Visual Studio Community. These problems came when I got back to Windows 7 from Win10 (because I had some problems).

When I launched the actual Visual Studio for the first time on Win7, it loaded good, but I didn't have any templates. So I decided to reinstall it. Uninstall went good, but when I tried to install it again, it just stopped at Microsoft Visual Studio Hub Services or something like that. It just really stopped, when I let it go, the progress bar never moved. Then it also said that it couldn't find it or something similar.

And then the fun starts. I tried to do it several times, same. Then I downloaded the Visual Studio 2013 Community, and it stopped on Build x86. Same like the Hub Services at the 2015 version. I gave up at this moment. But after that, I went angry and removed the all Visual Studio folders in the Program Files.

But later on, I found the Visual Studio 2015 Express for Desktop, I downloaded it and that time it said right at the beginning: A Prerelease version of Visual Studio Community is currently installed. Please uninstall it prior to proceeding with your current installation. I listened to it, went to Remove and Add Programs thing (don't know what name is it in english) and yeah, there was a version of that Visual Studio I removed. I tried to uninstall it, but it just said something again: The installation source for this product is not available. Make sure that the source exists and that you can access it.. And that's basically all.

So I would like to ask, how to fix this thing. It's because of that movement from Win10 to Win7? Or because of the VS folder deletement in Program Files? Any answers are very welcome!

EDIT: Main problem is that it stops at Microsoft Visual Studio Hub Services, I managed to uninstall the 2015 Community version, but then it stops and just didn't move, the only way was to remove the process to shut down the installing window and cancel the installing.

EDIT 2: Well, kinda shy of my grammar back then, fixed some bigger mistakes.

Upvotes: 4

Views: 12787

Answers (5)

entheh
entheh

Reputation: 958

[EDIT: you may want to scroll to the bottom for the nuclear option which I wish I'd discovered earlier!]

I've downgraded two computers from Windows 10 to 7, both with VS2015 on them. One worked and the other had its VS2015 break horribly. I also deleted the VS2015 directory and registry data that mentioned VS2015 and all sorts, and I had even more problems than you describe :) I think the difference is that I installed some new things (node.js and TypeScript) under Windows 10, and they inserted things into VS2015 which were no longer properly installed after the downgrade.

Here are my discoveries in a hopefully useful order:

When it hangs, what it's actually doing is trying to display this prompt asking you to supply the path to an installer it couldn't find.

You usually get to see these prompts if you 'Run as Administrator' the (main) installer (rather than letting it obtain Administrator privileges itself). Process Explorer helps shed light on this: if the main installer's window is associated with the child process, then the dialogues are visible. If the root process, they're not.

The prompt relates to old versions of packages that the installer wants to uninstall prior to installing a new one, and for some reason the installer doesn't know how to re-download those packages. It is usually looking under C:\ProgramData\Package Cache for them.

If you aren't seeing the dialogue, you can view logs in C:\Users\<you>\AppData\Local\Temp. Use the 'Details' view and sort this folder by date modified, to help you find the right one. Each sub-installer tends to make a new file so you may have to poke around a bit. Changing dates or file sizes also tell you that it's doing something.

Messages like this tend to be associated with the attempt to show a dialogue:

MSI (s) (24:D8) [13:00:25:033]: SOURCEMGMT: Trying source C:\ProgramData\Package Cache\{388D7468-1CCA-40C8-9F08-4C20E972E922}v14.0.25123\packages\BuildTools_MSBuildResMsi_amd64\.
MSI (s) (24:D8) [13:00:25:033]: Note: 1: 2203 2: C:\ProgramData\Package Cache\{388D7468-1CCA-40C8-9F08-4C20E972E922}v14.0.25123\packages\BuildTools_MSBuildResMsi_amd64\BuildTools_MSBuildResMsi.msi 3: -2147287037 
MSI (s) (24:D8) [13:00:25:033]: SOURCEMGMT: Source is invalid due to missing/inaccessible package.

So, what to do about these missing packages?

If you have another computer with a working Visual Studio 2015 installation, you can copy the entirety of Package Cache from there to your bad computer (no need to merge folders that already exist) and that will hopefully catch many of them.

For the rest, I tried a few third-party uninstallers, and Revo Uninstaller helped. Go into its settings and enable 'Show System Components'. Then, whenever you identify a problematic package, you'll usually be able to find it in Revo Uninstaller. If you uninstall it, you'll see the usual prompt (cancel it), and after it fails, Revo's 'Moderate' registry cleanup option does the trick ('Safe' didn't). If you use the Pro version then you can multi-select and use the 'Quick Uninstall' batch option, which isn't quite automated - yes, I'm afraid it will be tedious - but with some patience, you can get through everything.

Identifying the problematic packages is still a manual process, but the good news is that you can cancel many of the prompts during a run of the installer without it aborting, so you can collect a lot of package names as you go. You can also look for patterns in version numbers; for me, a lot of them were 14.0.15123` or something like that.

For me, just one package didn't show up in Revo Uninstaller, and I searched the registry myself and deleted some occurrences. I'm not sure if that or the subsequent install of the new package was what did it, but even that one went away.

So, after all that, I'm pleased to report that Visual Studio 2015 has got through the 'Repair' operation with no further errors. I still need to reboot before I can see if it runs without a hitch...

[EDIT: Nuclear option follows]

It didn't. Many of the standard windows (code editor and error list to name a couple) failed to load with the error "An item with the same key has already been added". On the plus side, at least Visual Studio didn't suddenly exit moments after opening. So that's an improvement and 2-3 days well spent :)

After that:

  • I found this answer and tried the TotalUninstaller linked therein.

  • Then I deleted more of the installation where that uninstaller reported it couldn't delete a non-empty directory.

  • Then I was going to reinstall from scratch, but would you believe it - it gave me Modify/Repair/Uninstall options! So I ran the Uninstall. (Maybe Repair would have worked, who knows?)

  • Then I reinstalled from scratch.

There was just one more failed uninstall of an old thing (Microsoft Web Deploy), but it didn't even report a warning at the end because of it, and now my Visual Studio finally seems to be intact - fingers crossed! (I may never test that web deploy thing anyway - I mainly use it with Unity. Of course I had to install the Unity tools again.)

So yeah. I have no idea if this works by itself or if you also have to do all the other stuff. If you try it and find out, let us know.

Upvotes: 2

real_yggdrasil
real_yggdrasil

Reputation: 1263

Uninstall any version of visual studio 2015 you already might have installed.

Then, delete this key: I had a similiar issue and found finally as cause entries under

HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\DevDiv\vs\Servicing\14.0. .

Upvotes: 0

Manh Dungz Augen
Manh Dungz Augen

Reputation: 1

In my case , I just restart the PC and after it boots up the VISUAL STUDIO 2015 will automatic come back and keep running. I did it with 2 PCs of users and with version Professional. Hope this helps.

Note : Please make sure to close all VS running on your PC before running install 2015 (in my case is VS Pro 2013) and make sure Windows updates have finished running (if they have).

Upvotes: 0

NickZ
NickZ

Reputation: 11

Since you are still seeing Visual Studio in Remove and Add Programs, your environment may not be entirely clean and you will have to first completely remove Visual Studio from the system. This should be independent of whether you're using Windows 7 or 10.

You may need to do further research, but here are some initial pointers:

Beyond trying those things and then re-attempting the install, please look for any logs generated from the failures. For example, in your %temp% folder.

Upvotes: 0

Maruthi Sikhakolli
Maruthi Sikhakolli

Reputation: 590

When Visual studio is installed, several other programs get installed. So when you try to uninstall visual studio, you should uninstall all other bunch of programs which were installed along with actual visual studio(which is a bit burden). It take so much time for me to uninstall all the programs from my computer. So while re installing please make sure you uninstall all the other installed apps also.

Upvotes: 2

Related Questions