Question

I've been experiencing this odd problem intermittently in Visual Studio 2012 running on Windows 7. Sometimes, when I go to collapse a solution folder in Solution Explorer, the tree beneath the folder doesn't collapse at all. It only seems to toggle to a different expanded state, but the small triangle next to the folder name correctly toggles to the closed orientation. Here's what I mean:

Exhibit A - Expanded Solution Folder

Note the triangle next to Transitional is in the open orientation.

Expanded Solution Folder

Then, I click on the triangle next to Transitional to collapse the folder, but instead of what you'd expect, I get this result:

Exhibit B - "Collapsed" Solution Folder

Again, note that the triangle indicates that the folder is collapsed, though that it obviously not the case.

"Collapsed" Solution Folder

So far, the only action that temporarily fixes the problem is to close and reopen the solution, and I have yet to determine what causes the problem to recur. I wonder if any of you have experienced this, and if so, did you find a more permanent solution?

Was it helpful?

Solution

I am facing the same problem, try uninstall all plugins and reinstall. In my case this was caused by slow cheetah. Also, try repair visual studio

OTHER TIPS

Use this macro:

Sub UIHierarchy_CollapseTree()
Dim Hierarchy As UIHierarchy

'Change Hierarchy to the following line to collapse the active window
'Hierarchy = DTE.ActiveWindow.Object
Hierarchy = DTE.Windows.Item(Constants.vsWindowKindSolutionExplorer).Object

CollapseHierarchyItems(Hierarchy.UIHierarchyItems)
End Sub
Sub CollapseHierarchyItems(ByVal HierarchyItems As UIHierarchyItems)
Dim SubHierarchyItem As UIHierarchyItem
For Each SubHierarchyItem In HierarchyItems
    CollapseHierarchyItems(SubHierarchyItem.UIHierarchyItems)
    SubHierarchyItem.UIHierarchyItems.Expanded = False
Next
End Sub
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top