locked
vsix add menu item, vs 2017 RRS feed

  • Question

  • Hi,

     I want to add a custom menu item, in right click on: project -> add menu

    I created a vsix project, and add custom command to the project. I see the new item under extensions.

    How Can I remove it to  project -> add menu?

    thanks


    • Edited by R.Z.B Sunday, May 5, 2019 8:53 AM
    Sunday, May 5, 2019 8:35 AM

All replies

  • Hi R.Z.B,

    Welcome to MSDN forum.

    Please check if this similar issue helps: Move contect menu to Add Node.

    You can use a commandplacement to reuse the command in Add node.

    Best Regards

    Lance


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.



    Monday, May 6, 2019 3:39 AM
  • Hi R.Z.B,

    It seems I misunderstand your meaning. What you want is a command under Project=>Add, right?

    If so, you can use IDG_VS_CTXT_PROJECT_ADD_ITEMS as your parent ID of Button Node.

    Simple steps to add a item under "Add node":

    1.Create a new vsix project, add an item: Custom Command

    2.In xxx.vsct file, change the content(Parent) of Button node.

    From:

    <Button guid="guidCommand1PackageCmdSet" id="Command1Id" priority="0x0100" type="Button">
            <Parent guid="guidCommand1PackageCmdSet" id="MyMenuGroup" />
            <Strings>
              <ButtonText>Invoke Command1</ButtonText>
            </Strings>
          </Button>

    To this:

    <Button guid="guidCommand1PackageCmdSet" id="Command1Id" priority="0x0100" type="Button">
            <Parent guid="guidSHLMainMenu" id="IDG_VS_CTXT_PROJECT_ADD_ITEMS" />
            <Strings>
              <ButtonText>Invoke Command1</ButtonText>
            </Strings>
          </Button>

    Don't forget to change the guid of parent from "guidCommand1PackageCmdSet" to "guidSHLMainMenu".

    And the menu would appear in the Add node like below:

    More details please check Ed's answer. Thanks to him!

    If my reply is helpful or not, please give a feedback. Have a nice day!

    Best Regards

    Lance


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.




    Monday, May 6, 2019 5:01 AM
  • Hi R.Z.B,

    Sorry to trouble you and just want to confirm that if your issue is solved or not, if not, please feel free to let us know, we will try our best to help you out.

    BTW, if you the reply is helpful then you could mark it as answer, that benefits for other community members who meet the similar issue, thanks in advance.

    Best Regards

    Lance


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Wednesday, May 8, 2019 1:38 AM