문제

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?

도움이 되었습니까?

해결책

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

다른 팁

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
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top