Wednesday, November 25, 2009

The Evil Solution User Option SUO file

I have a Visual Studio solution that's started taking longer and longer to load. In fact it was taking up to 5 minutes to load this solution which meant that I'd leave the solution open for days just so that I didn't have to reload it. Another symptomatic clue that all was not well in Denmark was that it was taking several minutes for the IDE to be usable after I stopped a debug session with Shift+F5.

My first stab at a solution was to create a new one in a different directory and add all my projects to it. Worked like a charm and the new solution loaded lightening faster (couple of seconds) and I could exit the debug session in about 3 seconds.

Although happy that I'd solved the problem I was then lucky enough to notice that in the original folder next to the solution's .sln file there was a Solution User Option .suo file which was a whopping 11Mb in size. I deleted this file and opened the original solution and discovered that my solution is now loading and exiting debug lickety-split again.

It might be my unorthodox way of exiting debug sessions with Shift+F5 that's causing this file to grow in size. I'll keep an eye on it's future growth and report back here if I learn anything new.

4 comments:

  1. Wowza! I just checked all of my SUO files because I've got a solution in VS2005 that just takes forever to do anything. That particular SUO file is the biggest of three long-term (4 years, 2 years, and 1 year) solutions and it clocks in at 263 KB. Something is very amiss with your file--too bad you deleted it rather than renaming it.

    ReplyDelete
  2. It went into the recycle basket so will be there for a number of days before it goes to bit heaven. What would you suggest I do with it?

    ReplyDelete
  3. Investigating this issue a little further, I found that the tool to actually examine this file is unavailable and was packaged with Visual Studio 6.0. It's a binary format that can be deleted without trouble. So it's not worth the trouble to examine…

    ReplyDelete
  4. Thanks for the follow-up Bill - much appreciated.

    ReplyDelete