Visual Studio freezing (crashing) while loading solution
Asked Answered
P

12

67

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?

Poteet answered 26/9, 2016 at 12:55 Comment(1)
Possible duplicate of Why Visual Studio 2015 freezes crashes hangs on Designer view?Hyalo
M
190

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

Magdeburg answered 26/9, 2016 at 13:39 Comment(7)
@ElteHupkes, unfortunately, this problem is not reproduced for me for a long time already. Try to delete temp files, disable plugins or load VS in safe mode devenv.exe /SafeModeMagdeburg
This applies to VS 2019 too! However, do you know what is it with the .vs folder that could case VS to hang.Padron
This is valid for VS 2022 also! Deleting the .VS folder worked for me. Without it, many sub processes would do don't-know-what, and hangs VS.Carmina
Visual studio recreate that folder when you start the project next time.Blitz
After so many years, never improve. It's crazy 80% of the time is spent fixing the tool rather than actual programming.Nazar
2023 and this still happens, actually happening more now in VS2022 than ever beforeCompress
Works, and if it persists, run CCleaner to clean up junk files.Waverley
N
38

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.

Nariko answered 13/7, 2017 at 11:5 Comment(4)
This works for me too. But come on Microsoft. Your own development environment running on your own Operating System and you still can't get it right. facepalmRaker
Is this answer for Visual Studio 2019?Maes
For me helped "Readjust source control in Tools -> Options -> Source control -> Plugins, set to None, Save, close VS. Then reopen it and reset the plugin.". I switched off GIT plugin, closed VS and reset again... Thanks.Socha
Works, and if it persists, run CCleaner to clean up junk files.Waverley
T
8

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

Taeniacide answered 17/12, 2020 at 6:56 Comment(3)
Glad I came back here to see your edit because it reappeared for me too! It works now after I deleted only the User.vskNoleta
I deleted ObjBrowEx.dat and User.vsk but it didn't fix the issueToothbrush
What worked for me was: Opened another solution, ran it, and closed the solution Then opened the solution that was causing "not responding" issue and no more freezingToothbrush
G
4

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.

Gaylord answered 17/11, 2017 at 18:34 Comment(3)
I have been doing that way before knowing the real answer. But at the end your suggestion doesn't solve the problem.Poteet
Right. I basically ignored the popup. I could still click on the project elements, so when I built/ran the project it went away.Falsity
After downloading Progress Telerik UI extension, VS 2022 pro was crashing. Double-clicking the solution resolved my issue. Thanks for sharing!Loutish
C
2

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.

Chateau answered 22/1, 2018 at 16:6 Comment(0)
A
1

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
Alyworth answered 22/10, 2020 at 10:27 Comment(1)
For me a old Database project caused the VS to crash... executing VS in safe mode helped me to find the issue.Myra
F
0

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

Fervid answered 1/6, 2021 at 7:44 Comment(0)
T
0

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.

Tonsillotomy answered 31/8, 2021 at 14:30 Comment(0)
N
0

For my case I need to delete the .vs all the time. Then I found out this link and did the setting. The issue never come back ever since.

https://msicc.net/how-to-work-around-ide-freezes-in-visual-studio-2019-when-switching-between-build-configurations/

  1. Open Tools / Options in Visual Studio 2019 and find the Projects and Solutions node
  2. Unselect ‘Allow parallel project initialization
  3. Click ‘OK’ and close the solution

enter image description here

Nazar answered 9/8, 2023 at 6:8 Comment(0)
R
0

Run command dotnet build before open VS

Rumor answered 15/8, 2023 at 22:55 Comment(0)
T
0

What worked for me was: Opened another solution, ran it, and closed the solution Then opened the solution that was causing "not responding" issue and no more freezing

Toothbrush answered 21/8, 2023 at 18:12 Comment(0)
B
0

Solution That worked for me:

Step 1- devenv.exe /SafeMode (Will open your Visual Studio in SafeMode)

It will show the reason, why it's failing to load your project.

For me - ActivityLog.xml was corrupted. You can delete that file. Visual Studio will automatically generate a new activity log file.

Step 2 - Close the Visual Studio and Reopen your project. It worked for me.

For safer side -

  1. Delete .vs folder from your project folder
  2. Delete temp files under path :: C:\Users\your_user_name\AppData\Local\Temp
Billhead answered 27/3, 2024 at 12:18 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.