I know that I can use Arrow Keys to collapse items of solution explorer one by one, but I would like to know if there is a way to collapse all items with only one operation. I want to know it because, today I have a solution with 6 projects that have at least two hundred files and if I try to collapse them one-by-one I will have a hard time.
我知道我可以使用箭头键逐个地折叠解决方案资源管理器的项,但是我想知道是否有一种方法可以用一个操作来折叠所有的项。我想知道这一点,因为今天我有一个解决方案,有6个项目,至少有200个文件,如果我试图一一崩溃,我将会遇到困难。
11 个解决方案
#1
#2
23
If you have ReSharper installed, you can right click on the solution in the solution explorer, and select "Collapse All".
如果您安装了ReSharper,您可以在解决方案资源管理器中右键单击解决方案,然后选择“折叠所有”。
#3
21
You can use PowerCommands for Visual Studio 2008
您可以在Visual Studio 2008中使用powercommand
Right click on the project\solution on the solution explorer and choose Collapse Project:
右键单击解决方案资源管理器上的项目\解决方案,选择“折叠项目”:
#4
13
Just use the number pad's Plus + and Minus - keys at the top-level node, to expand and collapse respectively (Note: * also expands the whole list.)
只需在*节点上使用数字pad的+ +和-键,分别展开和折叠(注意:*也扩展了整个列表)。
For the toolbox, you need to use * and / instead for expand/collapse. Go figure.
对于工具箱,您需要使用*和/而不是展开/折叠。图。
#5
8
As you can see in the screenshot below, there is an option called Collapse All and a shortcut key next to it.
正如您在下面的屏幕截图中看到的,在它旁边有一个名为“折叠所有”的选项和一个快捷键。
Now this shortcut key will not work for you ! Unless you set it up using Tools > Options > Keyboard
.
现在这个快捷键就不能用了!除非你使用>选项>键盘设置它。
The command name is ReSharper_CollapseInSolutionExplorer
.
命令名是resharper_seinsolutionexplorer。
Search using this command name and assign a shortcut key of your choice.
使用此命令名进行搜索并分配您所选择的快捷键。
and you now have a shortcut key ready to use to collapse all items in your solution explorer.
现在您有了一个快捷键,可以用来折叠解决方案资源管理器中的所有项。
I know I am a little late to this discussion, but this surely gonna help some one or other.
我知道我有点晚了,但这肯定会对某些人有所帮助。
#6
5
There's a macro at http://geekswithblogs.net/scottkuhl/archive/2007/04/09/111195.aspx for Visual Studio 2005.
在http://geekswithblogs.net/scottkuhl/archive/2007/04/09/111195.aspx上有一个Visual Studio 2005的宏。
#7
#8
3
Visual Studio 2012 is out on 8/15/2012, so I suggest upgrading to that to get a fast "Collapse All" toolbar button previously available only in the Productivity Power Tools' Solution Navigator, which was sometimes too slow to be usable.
Visual Studio 2012将于2012年8月15日发布,因此我建议升级到该版本,以获得一个快速的“折叠所有”工具栏按钮,该按钮以前只在生产能力工具的解决方案导航中可用,但有时太慢,无法使用。
#9
2
take a look on this
http://visualstudiogallery.msdn.microsoft.com/en-us/7272073b-32d4-4a84-93f7-77d09fb16f01
看看这个http://visualstudiogallery.msdn.microsoft.com/en-us/7272073b-32d4-4a84-93f7-77d09fb16f01
#10
1
Use the Visual Studio extension that fits your version of Visual Studio. In my case (I use Visual Studio 2012) I use the extension Productivity Power Tools, but, unfortunately this exist only for VS 2010 and latter... For VS 2008 there is a similar extension: Power Commands.
使用适合您版本的Visual Studio扩展。在我的例子中(我使用了Visual Studio 2012),我使用了扩展生产力工具,但不幸的是,这只适用于VS 2010和后者……对于VS 2008,有一个类似的扩展:Power命令。
#11
-2
Delete the *.suo
and *.csproj.user
files, and reopen the solution/projects.
删除*。锁和* .csproj。用户文件,并重新打开解决方案/项目。
#1
124
It appears to be built in by default in Visual Studio 2013 onwards.
它似乎是在2013年以后的Visual Studio中默认构建的。
#2
23
If you have ReSharper installed, you can right click on the solution in the solution explorer, and select "Collapse All".
如果您安装了ReSharper,您可以在解决方案资源管理器中右键单击解决方案,然后选择“折叠所有”。
#3
21
You can use PowerCommands for Visual Studio 2008
您可以在Visual Studio 2008中使用powercommand
Right click on the project\solution on the solution explorer and choose Collapse Project:
右键单击解决方案资源管理器上的项目\解决方案,选择“折叠项目”:
#4
13
Just use the number pad's Plus + and Minus - keys at the top-level node, to expand and collapse respectively (Note: * also expands the whole list.)
只需在*节点上使用数字pad的+ +和-键,分别展开和折叠(注意:*也扩展了整个列表)。
For the toolbox, you need to use * and / instead for expand/collapse. Go figure.
对于工具箱,您需要使用*和/而不是展开/折叠。图。
#5
8
As you can see in the screenshot below, there is an option called Collapse All and a shortcut key next to it.
正如您在下面的屏幕截图中看到的,在它旁边有一个名为“折叠所有”的选项和一个快捷键。
Now this shortcut key will not work for you ! Unless you set it up using Tools > Options > Keyboard
.
现在这个快捷键就不能用了!除非你使用>选项>键盘设置它。
The command name is ReSharper_CollapseInSolutionExplorer
.
命令名是resharper_seinsolutionexplorer。
Search using this command name and assign a shortcut key of your choice.
使用此命令名进行搜索并分配您所选择的快捷键。
and you now have a shortcut key ready to use to collapse all items in your solution explorer.
现在您有了一个快捷键,可以用来折叠解决方案资源管理器中的所有项。
I know I am a little late to this discussion, but this surely gonna help some one or other.
我知道我有点晚了,但这肯定会对某些人有所帮助。
#6
5
There's a macro at http://geekswithblogs.net/scottkuhl/archive/2007/04/09/111195.aspx for Visual Studio 2005.
在http://geekswithblogs.net/scottkuhl/archive/2007/04/09/111195.aspx上有一个Visual Studio 2005的宏。
#7
5
The VisualStudio extension CodeMaid provides collapsing.
VisualStudio扩展CodeMaid提供了崩溃。
Download from VisualStudioGallery.
从VisualStudioGallery下载。
The current version only supports VS2010 or higher, but you can install older versions side-by-side.
当前版本只支持VS2010或更高版本,但是您可以并排安装旧版本。
#8
3
Visual Studio 2012 is out on 8/15/2012, so I suggest upgrading to that to get a fast "Collapse All" toolbar button previously available only in the Productivity Power Tools' Solution Navigator, which was sometimes too slow to be usable.
Visual Studio 2012将于2012年8月15日发布,因此我建议升级到该版本,以获得一个快速的“折叠所有”工具栏按钮,该按钮以前只在生产能力工具的解决方案导航中可用,但有时太慢,无法使用。
#9
2
take a look on this
http://visualstudiogallery.msdn.microsoft.com/en-us/7272073b-32d4-4a84-93f7-77d09fb16f01
看看这个http://visualstudiogallery.msdn.microsoft.com/en-us/7272073b-32d4-4a84-93f7-77d09fb16f01
#10
1
Use the Visual Studio extension that fits your version of Visual Studio. In my case (I use Visual Studio 2012) I use the extension Productivity Power Tools, but, unfortunately this exist only for VS 2010 and latter... For VS 2008 there is a similar extension: Power Commands.
使用适合您版本的Visual Studio扩展。在我的例子中(我使用了Visual Studio 2012),我使用了扩展生产力工具,但不幸的是,这只适用于VS 2010和后者……对于VS 2008,有一个类似的扩展:Power命令。
#11
-2
Delete the *.suo
and *.csproj.user
files, and reopen the solution/projects.
删除*。锁和* .csproj。用户文件,并重新打开解决方案/项目。