Visual Studio freezing (crashing) while loading solution

Visual StudioVisual Studio-2015Resharper

Visual Studio Problem Overview


I've met with a strange problem. I had 7 projects in the solution. I had to add another MVC project. Now when the document (from the new project) is opened (for example HomeController.cs) and when this project is initializing at the start, it freezes the whole IDE like this:

enter image description here

(Some projects do not load)

After that, I have to kill the process. When I open VS again and fast click on another project (which is initializing) the freezing issue is gone. I have no idea what can cause a problem like this. I've tried with and without ReSharper but I get the same result. Also, I restored default settings of VS. Also repaired whole VS.

Maybe someone had the same problem and could give some helpful advice?

Visual Studio Solutions


Solution 1 - Visual Studio

Usually removing of the hidden .vs folder in solution directory fixes the problem.

Solution 2 - Visual Studio

Possible solutions:

  • Delete .vs folder as mentioned above

  • Clear temp files from %USERPROFILE%\AppData\Local\Temp

  • Readjust source control in Tools -> Options -> Source control -> Plugins, set to None, Save, close VS. Then reopen it and reset the plugin.

There is no particular order, but one of them might help.

Solution 3 - Visual Studio

I used to have this problem, it was solved just by double clicking any of the stuck projects. This nudges the loading process somehow and causes unloaded projects to complete its loading.

Solution 4 - Visual Studio

I experienced the same issue with VS 2019 and fixed it by deleting the user.json file from %USERPROFILE%\AppData\Roaming\Visual Studio Setup

EDIT

The issue reappeared after a few days, so I located the user settings for Visual Studio 2019 (%USERPROFILE%\AppData\Roaming\Microsoft\VisualStudio\16.0_f124b472) and deleting the following files seemed to have reset VS to a normal state:

Current.vsk
User.vsk
ObjBrowEx.dat

Please close all your solutions before deleting the files

Solution 5 - Visual Studio

Delete the .suo file in the solution folder.

I am pretty sure I found this answer somewhere on Stackoverflow before, but now I can't find it anymore. Credits to whoever came up with this.

Solution 6 - Visual Studio

None of above answers worked for me and found this solution. By opening solution in safe mode devenv.exe /SafeMode will show you details about file causing issue and then

  • Search for all the files in the project directory with extension *.user
  • and remove them all
  • last reloaded the projects

Solution 7 - Visual Studio

For Visual Studio 2019, I cleared my %USERPROFILE%\AppData\Local\Temp folder. It worked.

Solution 8 - Visual Studio

When you get over the past install multiply versions and the previous version was not fully uninstalled. This cause this issue in my case.

Control Panel > Programs > Programs and Features
Search for all Visual Studio related programs and Uninstall those.

Solution 9 - Visual Studio

Open the project as a website instead of loading solution file

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionkrypruView Question on Stackoverflow
Solution 1 - Visual StudioArtiomView Answer on Stackoverflow
Solution 2 - Visual StudioashView Answer on Stackoverflow
Solution 3 - Visual StudioSisyphusView Answer on Stackoverflow
Solution 4 - Visual StudioMJ33View Answer on Stackoverflow
Solution 5 - Visual Studiovmb100View Answer on Stackoverflow
Solution 6 - Visual StudioAneeq Azam KhanView Answer on Stackoverflow
Solution 7 - Visual StudioPranjalView Answer on Stackoverflow
Solution 8 - Visual Studioniek tuytelView Answer on Stackoverflow
Solution 9 - Visual StudioshahidaView Answer on Stackoverflow