This is my first attempt at creating a visual studio extension, so please bear with me if I'm a bit dense. I'm stuck on getting the vsct file to compile (and hopefully do what I want it to do, but right now I'd settle for compile!)
The errors I'm getting are:
Undefined 'Parent/@id' attribute 'ToolsMenuGroup ' in a <Menu> element MVCScaffolder
Undefined 'Parent/@id' attribute 'IDM_VS_MENU_TOOLS ' in a <Group> element MVCScaffolder
My goal is to create a submenu off of the Tools menu as a place to collect our customizations. To the user it should be:
Tools --> County of Lancaster --> Extension 1
Extension 2, etc.
From what I understand from How to: Create Menus, SubMenus, and Shortcut Menus, I need to add a couple of groups in there to hold the menu items. I believe the proper plan is:
IDM_VS_MENU_TOOLS (Tools) --> ToolsMenuGroup --> LancoMenu --> LancoMenuGroup --> Commands
And that's what I thought I had created. Only the compiler seems to disagree. Funny how the compiler always gets the last say.
Any help appreciated deeply!! Here's what I have:
<?xml version="1.0" encoding="utf-8"?>
<CommandTable
xmlns="http://schemas.microsoft.com/VisualStudio/2005-10-18/CommandTable"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<Extern href="stdidcmd.h"/>
<Extern href="vsshlids.h"/>
<Commands package="guidMVCScaffolderPackage">
<Menus>
<Menu guid="guidMVCScaffolderCmdSet"
id="LancoMenu"
priority="0x0100"
type="Menu">
<Parent guid="guidMVCScaffolderCmdSet"
id="ToolsMenuGroup "/>
<Strings>
<ButtonText>County of Lancaster</ButtonText>
<CommandName>County of Lancaster</CommandName>
</Strings>
</Menu>
</Menus>
<Groups>
<Group guid="guidMVCScaffolderCmdSet" id="ToolsMenuGroup" priority="0x0600">
<Parent guid="guidSHLMainMenu" id="IDM_VS_MENU_TOOLS "/>
</Group>
<Group guid="guidMVCScaffolderCmdSet" id="LancoMenuGroup" priority="0x0600">
<Parent guid="guidMVCScaffolderCmdSet" id="LancoMenu"/>
</Group>
</Groups>
<Buttons>
<Button guid="guidMVCScaffolderCmdSet" id="MVCScaffolderCommandId"
priority="0x0100" type="Button">
<Parent guid="guidMVCScaffolderCmdSet" id="LancoMenuGroup" />
<Strings>
<ButtonText>MVC Domain Model Scaffolder</ButtonText>
</Strings>
</Button>
</Buttons>
</Commands>
<Symbols>
<GuidSymbol name="guidMVCScaffolderPackage"
value="{44fd35ed-2596-4994-b72c-5b166acb077d}" />
<GuidSymbol name="guidMVCScaffolderCmdSet"
value="{4165f5d1-ccd0-4dee-97bb-f48a4f96c8ee}">
<IDSymbol name="ToolsMenuGroup" value="0x1000"/>
<IDSymbol name="LancoMenu" value ="0x0100"/>
<IDSymbol name="LancoMenuGroup" value="0x0010" />
<IDSymbol name="MVCScaffolderCommandId" value="0x0001" />
</GuidSymbol>
</Symbols>
</CommandTable>
There is an extra space. It will be fine once you get rid of it.