Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide alternative to IDG_VS_MM_TOOLSADDINS #7

Open
xEsteem opened this issue Oct 30, 2021 · 1 comment
Open

Provide alternative to IDG_VS_MM_TOOLSADDINS #7

xEsteem opened this issue Oct 30, 2021 · 1 comment
Assignees

Comments

@xEsteem
Copy link

xEsteem commented Oct 30, 2021

I'm using 16.0.29.6 in Visual Studio 2019 and i can't seem to find an alternative to IDG_VS_MM_TOOLSADDINS which is the id for the group in the "Extensions" menu that other extension submenus tend to appear under.
This is the top group in the extensions menu above the default group.

All i can find is the "Extensions" menu itself (VsMainMenu -> Extensions) and the "Extensions.DefaultGroup" menu which is the group below that which i am referring to, that contains "manage extensions" etc.

@CZEMacLeod
Copy link
Collaborator

Using the tools->addins menu I think is kind of a deprecated approach now.
I think the best approach now is to create your own group for all your commands under VsMainMenu -> Extensions and add all your menu items to that.
If you want the menu group to appear before the manage extensions group, give it a priority like 0x0000. If you want it below the manage extensions group, use something like 0x0600.

Based off the default community template for project with command, the following gave me what I think you are looking for.

  <Commands package="VSIXProject1">
    <Groups>
      <Group guid="VSIXProject1" id="MyMenuGroup" priority="0x0000">
		<Parent guid="VSMainMenu" id="Extensions"/>
      </Group>
    </Groups>

    <!--This section defines the elements the user can interact with, like a menu command or a button
        or combo box in a toolbar. -->
    <Buttons>
      <Button guid="VSIXProject1" id="MyCommand" priority="0x0100" type="Button">
        <Parent guid="VSIXProject1" id="MyMenuGroup" />
        <Icon guid="ImageCatalogGuid" id="StatusInformation" />
        <CommandFlag>IconIsMoniker</CommandFlag>
        <Strings>
          <ButtonText>My Command 2</ButtonText>
          <LocCanonicalName>.VSIXProject1.MyCommand</LocCanonicalName>
        </Strings>
      </Button>
    </Buttons>
  </Commands>

  <Symbols>
    <GuidSymbol name="VSIXProject1" value="{96e88d23-7d8a-44f8-98e4-490dad877c07}">
      <IDSymbol name="MyMenuGroup" value="0x0001" />
      <IDSymbol name="MyCommand" value="0x0100" />
    </GuidSymbol>
  </Symbols>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants