Customize project context menu of visual studio

2020-06-08 13:40发布

问题:

I'm using Visual Studio 2010 with some add-ins and extensions. The problem is now that the context menu of the project items in the solution explorer is getting so large that I always have to scroll down for the "Properties" and the "Open in Windows Explorer" which I use most. This is getting very nasty.

Is there a possibility to group commands into a sub menu or to modify the position of the commands in the context menu?

回答1:

Yes, it can be edited.

  • Go to 'Tools' -> 'Customize...' -> and select the 'Command' tab.
  • Select Context Menu and pick Project and Solution Context Menus | Project


回答2:

You can always use the keyboard to do the work for you.

  • The default binding for Properties is Alt+Enter (or sometimes F4 depending on what add-ins you have installed). Select the project in Solution Explorer and hit Alt+Enter to show it's properties. (This works for almost any other object as well, btw).
  • The default binding for view SolutionExplorer is Ctrl+Alt+L, so you don't have to use your mouse to get there.
  • There is no default binding for opening a project in Windows Explorer, but you can set one yourself.

The keyboard bindings are set under Tools->Options...->Environment->Keyboard, and the interesting settings in this case are probably View.SolutionExplorer, Project.OpenFolderinWindowsExplorer and View.PropertiesWindow or Project.Properties depending on which propertiy collection you were referring to.