arkord
arkord

Reputation: 291

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.

Upvotes: 15

Views: 1726

Answers (1)

Ross
Ross

Reputation: 261

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.

Upvotes: 20

Related Questions