A personal repository of technical notes. - CSC

Customize Context Menu of Visual Studio

Problem
Need to customize context menus (also known as shortcut menus) in Visual Studio .NET.

Solution
Note: This technique allows you to modify main menus and context menus.

Instructions tested in VS2013, VS2010 and SSMS 2012, SSMS 2014
  1. Tools/Customize.../Commands tab
  2. Click "Context menu"
  3. Select the menu to modify from the drop down menu
Instructions tested in VS2005, VS2008
  1. Tools/Customize.../Toolbars tab
  2. Check "Context Menus"
    Note: Context Menus may also be modified directly in the toolbar added on this step and the rest of the steps may be skipped.
  3. Commands tab/Rearrange Commands...
  4. Follow detailed steps in Microsoft reference titled "How to: Customize Main Menus and Shortcut Menus".
Common menus to modify
  • C# code-behind: Other Context Menus/Code Window
  • ASPX, ASCX front-end: Other Context Menus/ASPX Context
  • CSS style sheet: Other Context Menus/CSSSource
  • SQL Stored Proc: Other Context Menus | SqlEditorContextMenu
  • Solution Explorer: Project and Solution Context Menus | Item
  • Solution Explorer: Project and Solution Context Menus | Web Item
  • SSMS: File editor: Other Context Menus | SQL Files Editor Context
  • HTML, Classic ASP: Other Context Menus | HTML Context
Common commands to add
  • Edit/Collapse All Outlining
  • Macros/{Custom Macros} (Prior to VS2012)
  • Tools/{Custom Extensions}
  • File/TfsGetLatestVersion
  • File/TfsCheckOut
  • File/TfsCheckIn
  • File/TfsUndoCheckout
  • File/TfsHistory
  • File/TfsCompare
  • Tools/Customize...
Miscellaneous menus and commands
  • SQL Results Pane: Other Context Menus | SqlEditorResultsContextMenu
    • Data/Show/Hide Results Pane
Example


References
"How To: Customize Menus and Toolbars (Visual Studio)." MSDN Explore Desktop, Web, Cloud, and Phone Software Development. Web. 23 Aug. 2011.
<http://msdn.microsoft.com/en-us/library/wdee4yb6.aspx>.
"How To: Customize Main Menus and Shortcut Menus." MSDN: Microsoft Development, MSDN Subscriptions, Resources, and More. Web. 07 May 2010.
<http://msdn.microsoft.com/en-us/library/ms241445(VS.80).aspx>.

Updates
2015-05-28 Added VS2013, SSMS 2014 References
2013-09-30 Added SSMS references.
2013-02-01 Added Common commands to add. Changed example images.
2011-08-23 Added VS2010 References