Visual Studio: Is there a way to collapse all items of Solution Explorer?

Solution 1:

It appears to be built in by default in Visual Studio 2013 onwards.

Solution Explorer > Collapse

Solution 2:

If you have ReSharper installed, you can right click on the solution in the solution explorer, and select "Collapse All".

Solution 3:

You can use PowerCommands for Visual Studio 2008

Right click on the project\solution on the solution explorer and choose Collapse Project:

Solution 4:

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.