简体   繁体   中英

Hide Class-View in Solution Explorer

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).

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 eg 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

对于 VS2017 使用Disable Solution Explorer's Dynamic Nodes扩展github

或在 VS 命令提示符下:

vsregedit set "%VSINSTALLDIR%/" HKCU "" UseSolutionNavigatorGraphProvider dword 0

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

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?

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.

解决方案资源管理器搜索选项

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

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.

Bit late into the game.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM