Visual Studio 2013 Update 5 Takes forever to install/uninstall - visual-studio

I am installing Visual Studio 2013 Update 5 on windows 7. It got stuck for hours at a step. (I forgot at which step.) I then restarted and continued to install again. It got successfully installed but visual studio was giving weird errors while building the projects. So I ran repair on the installation. It got stuck again while applying "Windows Phone 8.1 SDK". There was no progress even when I left it to run overnight.
Now I am trying to uninstall update 5. But it has again stuck while applying "Windows Phone 8.1 SDK".
Any thoughts? Thanks.

Though I had fast internet, it was taking so long. I stopped the installation and tried again. It completed after few hours.

Had the same problem. After blocking the antivir activity, the speed of uninstalling raised many times. It is still slow, yes, but I see as the progress bar moves. The whole uninstall takes about 40 min.
Another feature I used is not uninstalling from Control Panel, but from command line, with /force key
cd c:\
dir /s vs_community.exe
Thus you find all folders containing vs_community.exe. Choose one from c:\ProgramData. cd to it. Launch
vs_community.exe /force /uninstall
It helps to overcome some possible blocking situations.
If the uninstalling process demands some additional files and their address by a popup message, download them and provide the downloads folder to the uninstall wizard. Sometimes it won't help, but then you can simply ignore it by cancelling the message. After uninstalling you can find these problem pieces of SW by name in the Control Panel and uninstall them separately.
This method helps even if you have several different installations of Visual Studio, with some of them broken.

Related

Unable to reinstall Visual Studio 2019

I tried to reinstall my Visual studio 2019 today and after I uninstall it I could not install it again.
Visual studio installer is starting, showing dialog to chose components and when I select what I need I click Install button and... Installer window disappears and there are 2 instances of installer in Task Manager one of which is loading CPU from 12 to 17 per cent and another one just sitting there never showing any signs of life. No errors or any signs of malfunctioning shown by Installer or could be found in a logs. Event Viewer also contains nothing.
Things I tried:
Deleting files from AppData\Local\Microsoft\VisualStudio
Rebooting
Redownloading Installer
Waited on running instance of Installer for quite some time, but without much of the success
Nothing works. I am out of ideas what possibly could be wrong. Never faced such a problem before. Any help would be greatly appreciated
1) delete any folders likeC:\Users\perryq\AppData\Local\Microsoft\VisualStudio\16.0_xxxx
and C:\Program Files (x86)\Microsoft Visual Studio\2019\xxx
Then,
run vs_installer as Administrator and try again.
Besides, if it still does not work, I suggest you could try to do a clean uninstallation of VS on your PC.
a) run C:\Program Files (x86)\Microsoft Visual Studio\Installer\resources\app\layout\InstallCleanup.exe, and it will uninstall all VS2017 and VS2019's version, caches, the registration information on your PC. If your PC does not have any other version or if you do not mind it, you can just execute it.
And when you finish it, you can run the latest vs_installer as Administrator to reinstall it again to test it.

Installing update2 for VS2015

I installed update2 for VS2015. This took a long time. Eventually I had to go home with my PC and decided to hibernate my PC. When I got I home I continued the installation. The install seemed to be fine but at the very end listed a whole bunch of errors, all about not being able to find a file (no file name provided). I can see that the install did install a whole bunch of stuff, but now I need to worry about what did not install.
When I attempt to re-run vs2015.2.exe it states that there is nothing to do and will do nothing even when I select either the 'Reset defaults' or 'Select All' options.
How can I re-install for my peace of mind?
My pc once crashed while installing Updates from VS2015 and it left some critical damage... I backed up my projects and reïnstalled VS, For me this was the easiest and fastest way to solve the problem, other wise it would probably be an almost impossible job to revert everything back
When the installation was finished i tried again, this time watching over my pc to insure nothing bad would happen again. This solved it on my pc and it Updated just fine!
Just open Control Panel, then click at Uninstall program and select Microsoft Visual Studio 2015.
Select Change and then click on repair.. Visual studio will repair itself and then you can install your update 2 again.
During repair you won't lost projects..

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.
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.
[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.
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:
https://msdn.microsoft.com/en-US/library/Aa983433(v=VS.90).aspx
https://support.microsoft.com/en-us/mats/program_install_and_uninstall
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.
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).
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. .

Can not uninstall VS2013 CE

I had VS2013 Community Edition installed on another hard disk. Unfortunately this hard disk died a sudden death some days ago.
Now I cannot uninstall / reinstall VS2013 Community Edition, because it always cancels the process saying that he is missing several packages.
Also the command vs_community.exe /uninstall /force fails with the same report.
Is there any way I can "manually" remove some files or registry entries so that the setup thinks there is no VS2013 installed?
Thank you very much!
Ok, I managed to solve the problem.
Partially followed this guide: https://support.microsoft.com/en-us/kb/248697
Used Process Monitor, launching the vs_community.exe filtering for VS, Visual Studio, 12.0, etc.
Also Total Commander, searching for files and directories containing mentioned strings and deleting them.
Additionally removed tons of Registry Entries using regedit and searching for those strings.
Hope I didn't break anything important in the process. :D
Then launching vs_community.exe /uninstall /force one last time. This time it went through without aborting.
And finally I got this much desired screen ... Phew!

Visual Studio 2015 installer hangs during install?

I downloaded the full ISO for Visual Studio Ultimate CTP 6. The installation program got to about the 90% mark, gauging by the progress bar, and just stuck there. There was frequent activity from Superfetch, Anti-malware protection, and other background processes, but the progress bar was dead still. Eventually the background task activity subsided after 20 minutes, but the progress bar still wouldn't budge.
CHEAP TRICK: Open a notepad window and position the left edge of it so it perfectly marks the current position of the progress bar. If it the progress bar doesn't move past the left edge of the notepad window in about an hour, it's probably stuck.
This was a case of one of the sub-installers getting stuck during the install and never completing. Unfortunately when this happens, it looks like the master installer never times out the operation. The trick is to open up the Task Manager in detail mode, and look for a sub-installer process that is showing 0% CPU usage and 0% disk usage, indicating it has died. Then just kill that process and the master installation will resume. In my case, the name of the sub-installer was SecondaryInstaller.exe and according to the installation log it happened while it was trying to install some Android SDK components for the cross platform development modules. It had frozen permanently. I killed it and the master installer completed. When I ran Visual Studio it was fine, although I'm guessing I'll have to do some digging on the Android components install problem.
I temporarily disabled my antivirus (AVG) and restarted the install. That fixed it.
The current version of AVG Free antivirus is incompatible with Microsoft Visual Studio 2015.
It does not allow Visual Studio to be installed on the computer. It gets stuck at "Creating restore point". Visual Studio installs perfectly when AVG is turned off.
Any code compiled in "Release" mode targeting x86 platform/environment (in project properties) does not compile. It compiles successfully when AVG is turned off.
I posted the issues in AVG support forum but no one responded.
Same thing happened to me, and I also tried to terminate secondary process from task manager. Do not do that. It is not a solution, but rather a hack which may cause issues later. In my case, I was not even able to uninstall Visual Studio. I tried both web installation and ISO, same issue.
Here is how it worked finally. I restored my Windows 7 to earliest restore point as possible, when there was nothing installed, so I was sure that there would be no conflicts between the different tools (Java, Android API, etc.)
I started the installation of Visual Studio 2015 Community Release Candidate at 10 p.m. At 7 a.m., it was working on Android API 19-21. A hour later, it was finally preparing Visual Studio.
This means that all you need to do is to actually wait 8 to 9 hours. Don't terminate the secondary installer at risk of breaking your Visual Studio; just wait.
During the installation if you think it has hung (notably during the "Android SDK Setup"), browse to your %temp% directory and order by "Date modified" (descending), there should be a bunch of log files created by the installer.
The one for the "Android SDK Setup" will be named "AndroidSDK_SI.log" (or similar).
Open the file and got to the end of it (Ctrl+End), this should indicate the progress of the current file that is being downloaded.
i.e: "(80%, 349 KiB/s, 99 seconds left)"
Reopening the file, again going to the end, you should see further indication that the download has progressed (or you could just track the modified timestamp of the file [in minutes]).
i.e: "(99%, 351 KiB/s, 1 seconds left)"
Unfortunately, the installer doesn't indicate this progress (it's running in a separate "Java.exe" process, used by the Android SDK).
This seems like a rather long-winded way to check what's happening but does give an indication that the installer hasn't hung and is doing something, albeit very slowly.
I had the same problem when I tried to install VS 2015 RC from ISO. It got stuck during Android SDK Setup (API Level 19 & 21, System Images). For me the problem was metered Wi-Fi connection. The installer didn't download necessary files.
Turning off the Internet connection resolved the problem. When installation finished, it said that some components were not installed and it will try to download and install them later.
Check if your Windows has pending updates. After the restart, installation worked as expected.
Alright so after hours of googling and failed attempts at solving this including many of the suggestions above, I found a solution I tried on a whim and worked for me.
Attempt to install the program, then, when it gets "stuck", cancel it, but don't uninstall.
Then, go to the control panel, go to programs, go and attempt to uninstall it, select "Repair" instead of Uninstall.
"Repairing" Visual Studio appears to have completely worked and was very quick, under 5 minutes and everything seems to work fine.
This issue is becoming very now, specially for users installing visual studio on windows 10 platform. What Microsoft suggests is disable your anti virus and anti malware programs and always run setup with admin permission.
But in my case I have to do lot more things to get rid of this issue:
1. Disabled AVG realtime protaction
2. Disabled AVG from task manager
3. Remove all the files and folders from system temp folder. (You can open it by typing %temp% and hit enter in run prompt)
4. Run setup again as admin
Here is a complete list of incidents that I faced in this issue (visual studio 2015 installation got stuck)
And how I resolved it
I got stuck during Android SDK Setup (API Level 19 and 21) Turning OFF and ON the Internet connection resolved the issue and the installation completed successfully.
My VS 2015 install hung after hours of downloading. The VS installer window said it was still proceeding, but Windows Resource Monitor indicated there had been no networ, disk, or CPU usage by the vs_community.exe process tree for dozens of minutes. Windows Process Explorer revealed wusa.exe at the bottom of this tree (wusa is Windows Update Standalone Installer). Tempted to kill wusa.exe, I instead heeded the warnings in other answers to this question.
After studying other answers here (strongly recommended), I made an educated guess and initiated a restart of my Windows 7 Pro. The restart hung because vs_community.exe would not exit. I therefore selected Cancel on Windows' restart popup.
Windows returned to my user session, and now the VS 2015 install came to life(!) Process Explorer revealed wusa.exe no longer present. I therefore suspect that was the roadblock, but my conscience is clean (I didn't kill wusa.exe, Windows did!)
After awhile the installer displayed the following:
When I clicked Restart Now, Windows restarted to a "Configuring Windows" screen, and completed my VS install.
This solution is a safe mix of killing the sub tasks answer and the waiting answer:
when the installer gets stuck, simply launch the task manager and kill the process
if you attempt to run the app again, it will say that the app installation is not complete
run the installer again, and click on repair
installs fine
When stuck on Visual Studio Preparation:
I killed vs_enterprise.exe with higher PID, Visual Studio threw an error, that "pipe is being closed". Restarted PC & Logged in. Visual Studio started automatically and has completed within 1 minute.
A better approach to find whether one of the subinstallers is blocked is to monitor its Network and Disk I/O activity. Process Explorer from Sysinternals does an excellent job. Android SDK Setup downloads large amounts of data (more than 1GB) and the CPU sits idle waiting for an I/O-bound operation to be completed. Under no circumstances you should attempt to kill any process, or you might risk corrupting your installation of Visual Studio. In the worst case scenario, cancelling and rerunning the setup should help.
Mine froze on the Diagnostic Tools for 3 hours. I tried disabling my firewall and turning off internet among many other attempts to resolve this. In the end the following actions allowed the installer to complete and VS2015 Community edition to launch.
I then opened the latest log file in the %temp% folder, and navigated
to the end of the file.
In the last few log lines there was an entry: "MSI (s) (DC:4C)
[16:28:36:577]: Created Custom Action Server with PID xxxx"
I ended the process with the same PID, and then the installer
continued. I had to do it roughly 3 times in total and then the
installer completed successfully.
All seems to be working OK so far (fingers crossed!!)
For Windows10:
1) Kill VS2015 Process if hung
2) Disable Windows Defender
3) Open VS2015 as Administrator
4) Enable Windows Defender
5) Initial VS2015 startup is complete
I have similar problems, my savior became Windows Safe Mode
STEPS:
Restart Windows in Safe Mode (*run msconfig -> boot -> boot options -> check safe boot -> mode Network)
In Safe Mode:
Enable Windows Installer:
REG ADD "HKLM\SYSTEM\CurrentControlSet\Control\SafeBoot\Network\MSIServer" /VE /T REG_SZ /F /D "Service"
Start Windows Installer service:
net start msiserver
Run Visual Studio Updater / Installer
Restart in normal mode (run msconfig -> boot -> boot options -> uncheck safe boot)
I had an issue with the Visual Studio Update 3 installer getting stuck on the "Features" tab at ther very start of installation...it would show only "Update 2 (installed)" and nothing else, with no way to proceed.
After trying some of the other more complex advice here, it turned out, to my surprise, that all I needed to do was use "Run as Administrator" when kicking off the installer. I was under the impression MSI generally runs with Admin privileges (under the Trusted Installer service) but I suppose the VS bootstrapper in this case does not.
I had the same issue. It would hang immediately, as soon as it said "Applying Microsoft Visual Studio 2015." There was only a small sliver in the progress bar. I even let the install run overnight. There was no disk activity or CPU usage from the installer.
What finally worked was to kill the process in Task Manager and restart the computer. As soon as I rebooted, the installer opened up automatically and completed successfully.
In my case the Graphics Tools Windows feature installation was hanging forever.
I've installed the Optional Windows Feature manually and restarted the setup of VS 2015.
I just installed VS 2015 Enterprise on Windows Server 2012 R2. The install was fast until it reached Update 1 which is past the 90% mark on the progress indicator. At that point, it took about 2 hours to complete. Be patient before you try anything more radical.
Mine got stuck applying the .NET 4.6.1 blah... Turning off the internet and disabling Microsoft Security Essentials Real-time protection got things moving again.
Well, I cant find any SecondaryInstaller.exe to stop in task manager and even I dont have any AV rather then Windows Defender so I found something else..
I stopped windows Update from elevated cmd by writing command net stop muauserv and it worked for me...
The update will Retry again for KB2664825 so run the code again in cmd..(because the service starts automatically)
Keep trying and its done for me...!!
I had the same problem on a different context. After trying to repair, uninstall, and reinstall with no solution, I decided to wipe out all Visual Studio remnant by using TotalUninstaller by follower the steps by steps on the link below:
https://github.com/Microsoft/VisualStudioUninstaller/releases
Once everything is removed, I was able to successfully install the software.
Be aware that TotalUninstaller will remove everything related to Visual Studio 2013 to 2015. Earlier version will still be preserved.
I added this solution in case someone has the exact same problem.
I've got same problem and unfortunately the accepted answer which suggests killing SecondaryInstaller.exe messed up installing the optional items. What I've done is basically opening the task manager and locate SecondaryInstaller.exe and right click and click on Open file location. Then run SecondaryInstaller.exe as an administrator.
In my case UAC was disabled (the infamous regedit trick) and so the installer clearly could not handle it.
You could revert back to UAC for the installer, or simply try launching it as admin, it worked for me.
If you are using windows 10, "Windows defender" might be the reason for blocking. mine is hang while installing "Java SE development"
To disable windows defender during the installation phase:
Open Windows Defender by clicking the Start button Picture of the Start button. In the search box, type Defender, and then, in the list of results, click Windows Defender.
Click Settings, and turn off Real-time protection.
I have experienced similar problems with Visual Studio 2015 Update 3.
In my case core issue was corrupted windows installer cache (C:\Windows\Installer)
Here is the line from msi installer log:
MSI (s) (4C:64) [10:40:10:059]: Warning: Local cached package 'C:\WINDOWS\Installer\3442502.msi' is missing.
You should check installation logs if installation cache is corrupted same way.
If it is you should pray for sfc utility to recover system integrity or you would reinstall windows from scratch as corrupted windows installer cache is a complete disaster and a reason to perform clear windows installation immediately.
I had a similar problem. My solution was to switch off the antivirus software (Avast), download the .iso file, mount it (double click in the Windows Explorer on the .iso file), and then run it from the PowerShell with admin rights with the following switches:
.\vs_community.exe /NoWeb /NoRefresh
This way you don't have to go offline or remove your existing installation.
For me it helped to stop the installation service forcefully using task manager. If Visual Studio was installed in Features & Programs then uninstall it, restart computer and try to install it again.
When starting the installation make sure to be have reliable internet connection

Resources