views:

34

answers:

2

VS 2008 is randomly opening sub-folders for me. Sometimes just a few, sometimes every sub-folder in my project or solution. This happens even when I am not using it - last night when I knoocked off, my solution explorer was closed up tight - this morning, one large project had dozens of sub-folders open.

This is not a matter of restoring a previously saved state - most of the folders that get opened are not part of the project, and I have never looked at them with VS.

I have downloaded and installed the PowerCommands add-in, and it lets me collapse everything nicely. But I don't want to have to do this several times per day - it closes up folders that I want to be open as well.

So, does anyone know why this happens and how to stop it?

I found this question from a few months ago which is about the same as this one, but was not answered. I am hoping someone has figured out a solution.

+1  A: 

Shot in the dark, but maybe close the solution, delete the .suo file from the solution folder and restart studio?

Michael
My initial reaction was to reject this, since my suo file was correctly restoring the solution explorer state if I closed and re-opened VS. However, I looked at the file, and it was over 1 MB. That seemed pretty big, so I deleted it. Maybe there was something screwed up in there - I will see if it makes a difference.
Ray
Oh well - it happened agan - thanx anyway :)
Ray
+1  A: 

The problem almost surely stems from someone trying to work around a wacky issue in the extensibility API which occasionally requires nodes in Solution Explorer to be programmatically expanded. Some solutions (including mine) properly clean up from expanding the nodes (collapses them to the original state), but some others leave the nodes expanded. If you have a macro or extension of some kind installed that works with project items, they might be using a poorly coded method for this action. You can read more about the underlying issue at the following link:

UIHierarchyItem from a ProjectItem

280Z28
Thanx - that's interesting, but I don't know if it applies to me. The only add-in I had was the new Reflector trial version. I removed it, and I will see if it helps.
Ray