Home > Coding > Disable expanding file contents in Visual Studio 2012 Solution Explorer

Disable expanding file contents in Visual Studio 2012 Solution Explorer

In Visual Studio 2012, the files in Solution Explorer are expandable, allowing the user to navigate to the symbols they contain:

Visual Studio 2012 Solution Explorer with expandable files

While this can be convenient, I personally never use the Solution Explorer to navigate the code symbols: I prefer using Resharper Go To Type/Symbol and the File Structure Window, or Visual Studio Navigate To and VS Code Map. When using the Solution Explorer, I usually want to rename, delete or create a new file. Having expandable files makes the folders and projects harder to distinguish, so I searched for a way to disable this feature.

After Googling to no avail, I finally found an hidden setting that can be set in the registry.
Go to HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\11.0 and add a new dword value named UseSolutionNavigatorGraphProvider with a value of 0. Restart Visual Studio and enjoy your old-school Solution Explorer:

Visual Studio 2012 Solution Explorer without expandable files

You can also directly apply this registry file: VS2012NoFileExpand

Categories: Coding Tags:
  1. MarthKoopa
    2012/11/03 06:26 | #1

    You, sir, deserve a medal for sharing this little trick. Those arrows were so annoying.

  2. Martijn Laarman
    2012/11/03 09:55 | #2

    Thanks!, no longer am I overwhelmed with expansion arrows :)

  3. user
    2013/01/05 17:54 | #3

    Cool but does not work for VS Express 2012 for Win Desktop on Win7

  4. user
    2013/01/06 20:55 | #4

    For VS Express 2012 for Win Desktop 32-bit it should be HKEY_CURRENT_USER\Software\Microsoft\WDExpress\11.0

  5. 2013/02/11 20:43 | #5

    Nice post. I was checking constantly this blog and I’m impressed! Very useful information specifically the last part :) I care for such info much. I was seeking this certain info for a long time. Thank you and best of luck.

  6. German
    2013/04/16 22:44 | #6

    Hi Julien, great post, but I have the inverse problem. I was able to expand files in Solution Explorer but for some reason it stopped working (maybe after Update 2) and I’d like it back. To me it’s useful for dragging and dropping classes into UML Class Diagrams. I tried creating your registry value but with value “1″ ;) but with no luck. Can you help me getting it back. I’d really appreciate it.
    Thanks again
    German

  1. No trackbacks yet.