Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Adding a submenu to an existing menu in a Visual Studio 2013 extension

I'm trying to build an extension in VS 2013 that adds a submenu to the Tools menu. Following the tutorials from microsoft: https://msdn.microsoft.com/en-us/library/vstudio/bb165739.aspx

The base example works fine and adds a brand new menu along the top menu bar but I'd like to add my submenu to the Tools menu. What I've done is changed the parent id in the menu section from IDG_VS_MM_TOOLSADDINS to IDM_VS_MENU_TOOLS but nothing shows up.

Here is the snipped of code that I've changed.

<Menu guid="guidTopLevelMenuCmdSet" id="TopLevelMenu" priority="0x700" type="Menu">
    <Parent guid="guidSHLMainMenu" id="IDG_VS_MM_TOOLSADDINS" />
    <!--<Parent guid="guidSHLMainMenu" id="IDM_VS_MENU_TOOLS" />-->
like image 921
Todd Smith Avatar asked Jun 18 '15 14:06

Todd Smith


People also ask

How do I add a menu in Visual Studio?

In Solution Explorer, open TopLevelMenuPackage. vsct. The guid and id values of the menu specify the command set and the specific menu in the command set. The guid and id values of the parent position the menu on the section of the Visual Studio menu bar that contains the Tools and Add-ins menus.

What is menu and submenu in VB?

A submenu is a secondary menu that appears in another menu. A submenu can be identified by the arrow that follows its name. Clicking the name causes the submenu and its commands to be displayed. This walkthrough creates a submenu in a menu on the Visual Studio menu bar and puts a new command on the submenu.

Where is the Tools menu in Visual Studio?

On the menu bar, choose Tools > Customize. The Customize dialog box opens. On the Toolbar tab, perform one of the following sets of steps: To add a toolbar, choose the New button, specify a name for the toolbar that you want to add, and then choose the OK button.


1 Answers

The parent of submenus or buttons must be a group (IDG_), not a menu (IDM_). You have a list of groups in the Tools menu in the section "Tools menu groups" of GUIDs and IDs of Visual Studio Menus

like image 159
Carlos Quintero Avatar answered Sep 29 '22 13:09

Carlos Quintero