Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio: prevent collapsing folders in solution explorer when opened

Every time I open a project in Visual Studio 2022 all folders in the solution explorer tree are collapsing. This is very annoying and interrupts my workflow. I couldn't find any setting for this. Is there a way to prevent this behavior?

This also appears to happen in older versions of Visual Studio.

like image 492
arkord Avatar asked Jan 25 '26 06:01

arkord


1 Answers

As @arkord commented on their own question, the auto-collapse is not coming from VS 2022, but rather from the CodeMaid extension. However they cited the incorrect settings.

  1. In Visual Studio, from the menu bar, select "Extensions" - "CodeMaid" - "Options..."
  2. Then select the "Collapsing" section
  3. Uncheck both the options for:
    • Collapse solutions when they are opened
    • If there is only one project in a solution, keep it expanded but still collapse its children
  4. Select the Save button

Now when opening your solutions in Visual Studio 2022, they should not auto-collapse, instead returning to where you last left off.

like image 174
Ross Avatar answered Jan 28 '26 02:01

Ross