Why does it take sooo long to load my solution in Visual Studio?

50,279

Solution 1

I found a solution myself and I wanted to share it here, hoping that it might save someone quite a few hours of research and staring at the "Preparing solution..." dialog.

When inspecting the devenv.exe process with Process Monitor, I found out that it is pretty busy with accessing the .svn directory. Here is what I did (and this somehow solved the problem):

  1. Kill Visual Studio
  2. Open Visual Studio without loading a solution
  3. Disable AnkhSvn as Source Control plugin (Tools->Options->Source Control->Plug-in Selection->None)
  4. Disable "Document Well 2010 Plus" (VS2010) or "Custom Document Well" (VS2012) in Productivity Power Tools (Tools->Options->Productivity Power Tools) - I read that somewhere and it might have helped as well...
  5. Close Visual Studio
  6. Delete the solution's *.suo file. This is located in the same folder as the solution itself. NOTE: You will lose several settings for your solution, like currently opened files, breakpoints, bookmarks, current solution configuration & platform (e.g. Debug x86) etc.
  7. Restart Visual Studio
  8. Load the solution - it was much faster now!
  9. Close Visual Studio
  10. Open Visual Studio without loading a solution
  11. Re-enable AnkhSvn and the "Document Well"
  12. Restart Visual Studio
  13. Open the solution - it was still loaded in seconds!

I do not know which of these steps actually solved the problem. Probably, not all these steps are required, but I did not want to reproduce the problem to find out which steps may be omitted. :)

Solution 2

None of those helped me, what I did... I watch with ProcMon of sysinternals, filtering for devenv, and I saw a lot of entries of fussionlog. I had enabled fussionlog for debugging purposes some weeks before and didn't think in disabling it. I just had to disable fussionlog and the solution opened faster.

Solution 3

You can open the Visual Studio in the Safe Mode, and then check your plugin and source control settings after opening the project. Safe Mode means "Starts Visual Studio, loading only the default environment and services."

How :

devenv /SafeMode 

Or according to your path

"C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe" /SafeMode

source : https://msdn.microsoft.com/en-us/library/ms241278.aspx

Solution 4

In my case, the following worked without any of the intervening steps suggested:

  1. Kill Visual Studio.
  2. Start Visual Studio directly (i.e., not from the .sln file).
  3. Then, from within Visual Studio, open the solution.

In my case this was all it took to make the problem solution load quite quickly, without the need for me to change any settings or delete any files.

Solution 5

fwiw, I realize this is a late entry, but I found that simply removing (deleting) my large number of breakpoints resolved the excessive load time and compile time. This action reduced the size of the .suo file from 214MB to 977KB. Let VS handle the .suo file itself. Compiling and loading now takes < 1 minute instead of 5-10 minutes for a solution with 35 projects. Visual Studio 2012 Pro, update 4.

Share:
50,279
gehho
Author by

gehho

Updated on July 09, 2022

Comments

  • gehho
    gehho almost 2 years

    We have a really big solution with more than 200 projects and thousands of files. Despite of that the solution used to load pretty quickly in Visual Studio 2010 as well as 2012. However, after copying the whole SVN repository to another location, loading and closing the solution suddenly took extreeeemly long. (I am talking about 30-60 minutes here!)

  • AxA
    AxA almost 10 years
    Thanks for sharing this. In my case, deleting suo file improved loading performance of the solution.
  • mikeLspohn
    mikeLspohn about 9 years
    Thanks I've been having so much trouble with this the last few days and there's tons of complaints about stuff like this but no other answers solved my problem.
  • SausageFingers
    SausageFingers over 8 years
    Step 6 fixed it for me - Delete the solution's *.suo file.
  • But I'm Not A Wrapper Class
    But I'm Not A Wrapper Class over 8 years
    This is a useful blog post in my opinion: briannoyes.net/2008/05/10/…
  • Sam Shiles
    Sam Shiles over 7 years
    Step 6 fixed it for me too.
  • Matthew Allen
    Matthew Allen about 7 years
    I did just step 3 to disable AnkhSvn plugin. That worked for me. It went from a half an hour to a minute.
  • Tot Zam
    Tot Zam over 6 years
    This greatly improved the start and stop debugging time as well.
  • glaucon
    glaucon almost 6 years
    For me this worked remarkably well. It went from taking minutes when opening VS in conjunction with a solution to taking less than a minute to do all three steps.
  • mgouin
    mgouin over 5 years
    Just to chime in to confirm this also solved the same problem in Visual Studio Express 2010. We don't use any of the plugins mentioned in the solution, but just deleting the .suo and ipch helped. Thanks!
  • Reza
    Reza over 2 years
    I have same problem in vs 2022 ! deleting suo file solved the problem