Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio freezing (crashing) while loading solution

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?

like image 404
krypru Avatar asked Sep 26 '16 12:09

krypru


People also ask

How do I fix Visual Studio from crashing?

Please open CMD and go to C:\Program Files (x86)\Microsoft Visual Studio\2019\version name\Common7\IDE folder, run the command: devenv /safemode to run your Visual Studio in safe mode. Then, create a new project and check if the installed extensions lead to the problem or not.

Why does Visual Studio freeze so much?

The freeze of the solution is caused by a feature that is meant to fasten up solution loading: parallel project initialization. It seems to be an issue that some others already had with 16.2. x versions, so it may be a regression (as it is flagged as fixed).

How do I stop VS code from crashing?

If while opening a large file, VSCode freezes and then crashes, you need to delete some files. So, open Run, paste “%AppData%” and click Ok. Now, open Code > Backup and then delete the only folder that is inside that directory. Finally, restart VSCode and see if the issue persists.


2 Answers

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

like image 129
Artiom Avatar answered Oct 04 '22 16:10

Artiom


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.

like image 30
ash Avatar answered Oct 04 '22 16:10

ash