visual-studiovisual-studio-2010solution-explorer

Collapse all files at once in Solution Explorer window in Visual Studio


Is there a way to collapse all the files at once in the Solution Explorer window in Visual Studio?


Solution

  • Use the extension Collapse Solution. Usually, this feature comes with ReSharper, but I presume that you are not using ReSharper.

    There are also a lot of macros out there that help you do the same. One of them is in ‘Collapse All’ in Visual Studio.

    Note: There is no inbuilt way in Visual Studio to actually achieve this. And considering just how practical it is, I would have thought they would have added this kind of feature way back in Visual Studio 2005 itself. I know people have been asking for it for years. But in their infinite wisdom, Microsoft don't consider it important enough.