31

Is there a way to hide the classes-inside-a-file in solution explorer?

It adds to the "noise" there. The drop-down triangles are quite confusing - I want to immediately see what files are hidden (in solution explorer).

1
  • 2
    @Mr.B The drop-down triangles are quite confusing - I want to immediately see what files are hidden (in solution explorer).
    – ispiro
    Aug 25, 2015 at 19:45

9 Answers 9

21

Instructions for Visual Studio 2017:

  1. Close Visual Studio 2017
  2. Open Registry Editor (regedit), select HKEY_USERS
  3. File → Load Hive → %localappdata%\Microsoft\VisualStudio\15.0_<id>\privateregistry.bin where <id> is some hexadecimal gibberish. Set Key Name to the one you like e.g. vs2017
  4. Go to HKEY_USERS\vs2017\Software\Microsoft\VisualStudio\15.0_<id>
  5. Create new key UseSolutionNavigatorGraphProvider of DWORD (32-bit) type, value 0
  6. Select HKEY_USERS\vs2017, File → Unload Hive
2
  • 5
    So that's what Microsoft understands under more portable settings, simply dump them into a registry hive file. Pathetic... thanks for this anyway!
    – Ray
    Mar 13, 2017 at 8:35
  • 12
    I didn't have to load/dump the binary file. I just added the dword UseSolutionNavigatorGraphProvider key to HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\15.0_<id>
    – Chet
    Apr 27, 2017 at 16:03
16

For VS2017 use Disable Solution Explorer's Dynamic Nodes extension github

0
14

or in VS Command prompt:

vsregedit set "%VSINSTALLDIR%/" HKCU "" UseSolutionNavigatorGraphProvider dword 0
2
  • 2
    This is the way to go! Works on VS 2017, 2019, and presumably 2015, with no need to navigate regedit or even leave Visual Studio. Apr 28, 2020 at 13:13
  • 1
    Still works for VS 2022. Restart VS afterwards. Sep 23, 2022 at 18:21
12

Use registry editor to set UseSolutionNavigatorGraphProvider value in HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\12.0 to 0. Or save the following lines into a file called "patchsolutionexplorer.reg" or something like this and import it into the registry:

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\12.0]
"UseSolutionNavigatorGraphProvider"=dword:00000000
2
  • 1
    Thanks. I hope there's something less "hacky". I rather not mess with the registry with undocumented settings.
    – ispiro
    Aug 25, 2015 at 19:49
  • 1
    You'd have to convince microsoft developers of two things. 1) clutter is not good. 2) the registry is not an appropriate location for user settings. Until then, we live the microsoft way :)
    – aaaaaa
    Aug 12, 2017 at 18:24
12

For VS2019 it's the same registry hack

Computer\HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\16.0_<id>

Add new DWORD UseSolutionNavigatorGraphProvider set to 0

1
  • 8
    I wonder how many more years will I have to keep searching for this registry hack.
    – Neutrino
    Jun 26, 2019 at 19:01
5

info from this link

Still some people never use the Solution Explorer to navigate the code symbols and methods. In this case expansion arrows on code files only create distraction in the Solution Explorer window. There is no option to control the availability of file expansion, but there is the UseSolutionNavigatorGraphProvider dword registry value (discovered by Julien Lebosquain) that you can set to 0 to disable class view in Solution Explorer. The registry key for this value is HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\11.0 for Visual Studio 2012 and HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\12.0 for Visual Studio 2013 correspondingly:

it's makes sense for you?

4
  • Thanks. But that post is almost 2 years old. I hope there's something less "hacky" by now. I rather not mess with the registry with undocumented settings.
    – ispiro
    Aug 25, 2015 at 19:48
  • If you want a UI for that, use VSCommands. Even while this feature is undocumented, it surely won't break anything in case MS decides to throw it out.
    – Ray
    Apr 12, 2016 at 9:42
  • I added this key to VS 2015 (14.0) and the Key does not seem to work anymore :-( Jun 22, 2016 at 7:13
  • 2
    @DeeJ.Doena that works for me just fine [HKEY_CURRENT_USER\SOFTWARE\Microsoft\VisualStudio\14.0] and "UseSolutionNavigatorGraphProvider"=dword:00000000 (32-bit dword) Jun 26, 2016 at 11:42
4

In VS2017 (and pretty sure in VS2015 also), click on the little triangle to the right of the search box in Solution Explorer. In the window that pops up, uncheck 'Search within file contents'. That will only show files in the filtered results.

Solution Explorer Search options

2
  • 2
    The question is not about the Search! Dec 1, 2018 at 11:34
  • Ah, yes. Thanks for pointing that out. Will leave this here for now still as some have found it useful. Will try to move it if I find a related question.
    – strider
    Dec 4, 2018 at 18:07
2

Bit late into the game.

This extension hides dynamic nodes. Disable Solution Explorer's Dynamic Nodes

0
1

If you install the extension VSCommands, you have a setting to disable this. http://vscommands.squaredinfinity.com/

Go to Tools -> Options -> VSCommands 12 and press the "Open Configuration" button.

Now the configuration screen of VSCommands will open. Go to "Solution Explorer" under "IDE Enhancements". Now check the checkbox "Disable Graph provider" and restart Visual Studio.

Now the classes inside a file should not be visible anymore in the Solution Explorer.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.