+4  A: 

There's a macro at http://geekswithblogs.net/scottkuhl/archive/2007/04/09/111195.aspx for Visual Studio 2005.

TLiebe
I'm sorry, but how do I run that macro into VS2008?
Cleiton
go to Tools -> Macros -> Macro IDE, and paste the macro code in a module
Thomas Levesque
thanks for your help.
Cleiton
+8  A: 
HuBeZa
love powercommands, except the "undo close" window that won't die.
Muad'Dib
I tryed to use it, but after it was installed on my machine, my vs2008 stopped to work. LOL
Cleiton
@Chris: I never tried it (I actually use the undo close window), but under Tools\Options\PowerCommands\Commands you can disable any feature you want.
HuBeZa
PowerCommands tends to break the WPF designer, unfortunately.
Kyralessa
+7  A: 

This is a perfect tutorial for Visual Studio 2008 - http://it.toolbox.com/blogs/think-clients/visual-studio-macro-collapse-solution-explorer-18035

I use it on my own, it is really cool.

Svetlozar Angelov
+1  A: 

Delete the *.suo and *.csproj.user files, and reopen the solution/projects.

Cecil Has a Name
I know it works, but if i do i will lost all my preferences.
Cleiton
What preferences? The projects will still compile the same.
Cecil Has a Name
A: 

ReSharper adds that much needed feature.

Pete
A: 

Hi all ! There is a much simpler solution. Just click on the solution an press the * key.

João Guilherme
That certainly *expands* everything, but it doesn't appear to *collapse* everything. It also takes about a year to finish.
Kyralessa
Kyralessa, I tryed it here and it collapsed everything. Wich item it didn't collapse for you ? Just for curiosity. Thanks
João Guilherme
It didn't collapse *anything* for me. What version of Visual Studio are you using? What language are you using? It may be that some other version does it. I'm using VS 2008, US English.
Kyralessa
I'm sorry. I was wrong * expands all and if you press - it collapses just the active folder, not the sub-folders. Sorry for that.
João Guilherme
A: 

Just use the number pad's Plus and Minus keys at the top-level node. (Also, * expands the whole list.)

For the toolbox, you need to use * and / instead for expand/collapse. Go figure.

AL