Visual Studio Community 2015 is the free edition of Visual Studio, so I decided to install it on my computer. Setup contains lots of components, so installation running considerable amount of time was expected, but after 3 hours, it was only 30% finished. Another hour later, the setup was still trying to install the same package. It seemed that the installation got stuck. In this post I will share how I tried to solve the problem and what eventually worked.
The problem I had was deciding what to do next. There were many options to choose from. I could:
- Try to run install again
- Go to Programs and Features > Visual Studio Community > Change > Repair
- Go to Programs and Features > Visual Studio Community > Change > Uninstall
- Restore the system using System Restore that was created before the installation began and then try again
- Restart the computer and try again
Before I could make a decision what to do, I had to cancel the setup, but even that got stuck.
I had to go to Task Manager to end the installation by stopping vs_community.exe
process.
First, I tried to go with a second option where I chose the Repair option. That didn’t do much. Running it as Administrator also didn't do the trick. I was getting the message:
I tried Third option using Uninstall but it gave me the same message.
Next I decided to restart the computer and try again. After restart, the Windows did load without any issues except that the Visual Studio Community Installation setup automatically opened, giving me the option of Uninstall or Repair. I chose Repair.
Finally, the installation completed with no issues at all. Finally, issues with Visual Studio has been solved…or so I thought.
Table of Contents
Strange Errors in Visual Studio
Visual Studio seemed to work just fine, but when I wanted to create ASP.NET 4.5.2 Webforms project, I got this strange error:
I tried to create a blank solution which worked without errors, but when I wanted to add a new project to the solution, I received a different error:
If I looked into the solution using Windows Explorer, I noticed the files were created for the project, so I tried to add an existing project to the solution, but that didn’t help either. I again received the above "Visual C# 2015 compiler could not be created" error.
Looking on the web, I noticed those errors are not rare and there were plenty of suggestions, on how to fix them. The most frequent suggestions were:
- Running Visual Studio from command prompt with
devenv.exe /resetsettings
- Delete Visual Studio folder in
user/appdata/microsoft/visualstudio/vs version
- Modify some registry
Unfortunately nothing of the above worked for me.
What did work
What finally worked was uninstalling the Visual studio, restarting the computer and install it again.
This time the installation succeeded and VS Community is still working with no issues.
So to recap. After stuck setup, restart the computer, then in Visual Studio Setup choose Uninstall instead of Repair, restart computer again (just to be on the safe side), run VS setup once more and hope for the best. But there is another way to try to install Visual Studio, which is discussed next.
Another Solution that worked - download ISO and install it offline
Commentator Abbas Banu Vohra mentioned another solution that involves installing Visual Studio using command prompt. Basically what we do is first download ISO version of the Visual Studio Community, extract it and then instead of installing, we use setup to first download the files directly to hard drive by using command line arguments. I recently had to reinstall Visual Studio and again got stuck during install, so I tried this solution and it worked flawlessly, just be aware that ISO is 7GB of size, and the downloaded setup files will be around 22GB.
Steps are as follows:
- Get the ISO version of the Community Edition. You should find it HERE under "Visual Studio Downloads" section. Select Community 2015 and choose ISO format as shown below:
- After saving the 7GB big ISO file
vs2015.3.com_enu.iso
, extract it with archive utility like WinRar or 7-zip. - In the extracted files, there should be
vs_community.exe
file. We will run this file in command prompt. Easiest way to do this is to go to the folder wherevs_community.exe
is located with Windows Explorer and then simply type CMD inside Address bar. This will open CMD on that folder. - We will use /layout Directory parameter of
vs_community.exe
file. This will copy installation files to the folder you specified in Directory. - Once in CMD console, type
vs_community /layout yourdirectory
(for example, vs_community /layout c:\vs2015) - If you don't have fast internet connection, you could try using
/noweb
argument in addition to/Layout
. This should prevent downloading 15GB of the "Optional items" from the internet. Note that by using/noweb
argument, optional items needed for installation during setup will be downloaded / acquired from the web, which might cause the original problem of being stuck. - Setup window will show up as shown below:
- After clicking on Download button, It will start to download / acquire all the setup files to that specified folder.
- Note that most of the download will finish rather quickly since they are located in extracted ISO file but acquiring the Optional Items at the end of the progress bar (around 15GB) can take some time as they will be downloaded from the internet. Using
/NoWeb
argument will prevent that as mentioned in step 6. - After all items are downloaded, click on Complete button.
- Now go to the folder of the downloaded files (folder that you specified in
/layout
argument) and runvs_community.exe
. Now, the setup will install offline by using the downloaded media in your hard drive.
Diagnostics Tips
Here are some additional tips, that might help you diagnose the problem with the installation.
How to determine if the installation is stuck or not
If you are unsure if setup is just stuck or the component takes a while to install, check the processes in Task Manager. The number of processes will continue to change. Some of the processes that will come and go during installation:
|
|
So if you think the installation is stuck, monitoring processes in Task Manager might help you determine if that is indeed the case.
Checking the installation log files
Another way to analyze the setup is to check out the installation logs. In Windows 7, these files are located at %userprofile%\appdata\local\temp
.
Each component has its own installation log file. All filenames start with dd_vs_community_
.
Conclusion
Visual Studio setup needs to install a lot of components, so it may take a while to finish but sometimes the setup can get stuck. First, we need to determine if the installation is really stuck. If it is, we can try different things to solve the problem. We can simply try Restart and Uninstall or we could download ISO and install it offline.
If you found this post useful, consider sharing it on social networks. If you solved this issue in any other way, drop a comment and let us know.
Abbas Banu Vohra
April 9, 2016This is a good post, but it is way off mark. I have been researching this issue and i am really surprised, that most of the folks trying to install visual studio 2015 or one of its update are not aware of a simple fact, that all they have to do is run the setup as an admin with the /NoWeb argument and the setup will succeed in reasonable time. The real culprit is not the setup itself, but that it tries to download and apply optional items not included in the .iso file. Of course if you use the web setup to install the product, you do get a feedback on the main core items that are initially installed, and all those items are available in the iso, which can be easily downloaded. But the other optional items can only be applied by the setup by downloading and then be installed. So i simple use the /Layout argument to the visual studio setup to cache all the items offline, then i use either /NoWeb or disconnect from internet or both to ensure that i can install all my components ok.
Hope this helps to someone 😉
admin
April 9, 2016Thank you for the comprehensive explanation of your solution. I'll add it to the post.
Joeraid
January 27, 2018I think what you said about the installer trying to apply nonexistent components is correct I checked the task manager undertaking the same problem of it being stuck and found that two processes (can't remember the names exactly but I believe they both started with KB and had a bunch of numbers) are running in the background and once terminated the installer signaled completion. Interestingly, it gave a message stating that 133 out of 131 components have been repaired which is hilarious. Might not be the same problem for everyone but terminating the two processes is worth the try, it worked for me.
Sreekanth Golla
May 5, 2016Thank you for the post. After certain software install or a system restore (windows 7), it is important you do additional reboot of the machine before doing installs or uninstalls. Ideally such software should ask for reboot but they do not do so after install. I had a situation where my uninstall was stuck for several hours doing nothing. When-ever this happen after uninstall of any vc++ redistributable or a visual studio component, then i did reboot before proceeding further when ever I'm stuck. Only VS 2013 uninstall was smart to detect upon a reboot that there was a pending uninstall killed before reboot. Thank you all. Good luck!
Unknown
May 25, 2016Still not fixed for me 🙁
Nilesh Bedekar
August 15, 2016I have tried every damn thing to install VS 2015 Professional on windows 7 pro sp1... I disabled my QuickHeal... started setup after disabling uac... it still gets stuck at various junctures... did a forced shut down when it was stuck for the first time as i found this info after googling... also tried to launch the setup in safe mode with nw... nothing works and this stupid piece of shit never gets installed completely... this really is a pain in the **********
admin
August 15, 2016Sorry to hear that. For me, after few failed installation attempts, downloading the ISO and installing it offline finally did the trick.
Reha Oguz
October 26, 2016Just kill the java.exe several times when installation hangs.
It worked for me
Abdullah
January 24, 2017A very good article for vs installation related problems.
Tip:
Under section Diagnostics Tips, there may be other sub-installers appearing and disappearing in Task Manager when downloading offline installer. A better approach would be to use a utility like http://www.nirsoft.net/utils/folder_changes_view.html to see if installer is continually downloading files at your specified location given to installer. Simply give the path to this tool and this will monitor folder changes at run time. This helped me decide that installer was not actually stuck. It was just taking some time (downloading optional items :/)
admin
January 24, 2017Thank you for the tip about FolderChangesView utility. You are right. This tool can come really handy with the VS installation issue.
David K
June 22, 2018I had a similar problem. The issue was that the splash screen wasn't updating unless I dragged it around with the mouse. Looks like an update event wasn't being handled properly.
SHALOM
July 31, 2018trying to install visual studio express 2013 but it keeps taking me back to repair or uninstall...tried that couple of times still the same thing.... any help...i dont really understand this command prompt of a thing...