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.
如果您安装了 ReSharper,您可以在解决方案资源管理器中右键单击解决方案,然后选择“全部折叠”。
You can use PowerCommands for Visual Studio 2008
Right click on the project\\solution on the solution explorer and choose Collapse Project:
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.)
For the toolbox, you need to use * and / instead for expand/collapse. Go figure.
If you have Resharper installed, 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
.
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.
http://geekswithblogs.net/scottkuhl/archive/2007/04/09/111195.aspx 上有一个用于 Visual Studio 2005 的宏。
Using Visual Studio 2017 and above
use shortcut
To Collapse All
Add a new shortcut for example Ctrl + Left Arrow , Ctrl + Left Arrow
To Expand All
Visual Studio 2012 将于 2012 年 8 月 15 日发布,因此我建议升级到该版本以获得一个快速的“全部折叠”工具栏按钮,以前仅在 Productivity Power Tools 的解决方案导航器中可用,有时速度太慢而无法使用。
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 .
删除*.suo
和*.csproj.user
文件,然后重新打开解决方案/项目。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.