none
Getting a Visual Studio add-in to show up. Help! RRS feed

  • Question

  • I've created a new Visual Studio Package (add-in), but can't get a menu item to show up in the context menu in the solution explorer. I have a zip'ed project with all of the code, if anyone could be so kind to look at it. The source is here: http://thomasardal.com/files/vspackage.zip
    Thursday, September 15, 2011 9:54 AM

Answers

  • Where is the group associated with this

    <Parent guid="guidReferenceContext" id="cmdAddReferenceGroup" />

    Also it isn't clear where you are getting these other GUIDs and command ids...they appear to be already defined ones, but things like guidVenusCmdId doesn't appear to match the Venus command GUID (which I believe is: {C7547851-4E3A-4e5b-9173-FA6E9C8BD82C}).  You shouldn't be trying to redefine those symbols 'locally', if you are trying to place an items on the Venus (web dev) context menu you should use the symbols they have already defined (I imagine they should in one of the headers in the SDK).

    Ryan


    Friday, September 16, 2011 5:32 AM
    Moderator

All replies

  • I'm really stuck on this one. If anyone could help, I would really appreciate it! I think the problem is in the vsct file:

    <?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"/>
    
      <Extern href="msobtnid.h"/>
    
    
    
      <Commands package="guidVSPackage1Pkg">
    
        <Buttons>
    
          <Button guid="guidVSPackage1CmdSet" id="cmdidMyCommand" priority="0x0100" type="Button">
    
            <Parent guid="guidReferenceContext" id="cmdAddReferenceGroup" />
    
            <Icon guid="guidImages" id="bmpPic1" />
    
            <!--<CommandFlag>DefaultInvisible</CommandFlag>
    
            <CommandFlag>DynamicVisibility</CommandFlag>-->
    
            <Strings>
    
              <!--<CommandName>cmdidMyCommand</CommandName>-->
    
              <ButtonText>Export this...</ButtonText>
    
            </Strings>
    
          </Button>
    
        </Buttons>
    
    
    
        <Bitmaps>
    
          <Bitmap guid="guidImages" href="Resources\Images_32bit.bmp" usedList="bmpPic1, bmpPic2, bmpPicSearch, bmpPicX, bmpPicArrows"/>
    
        </Bitmaps>
    
      </Commands>
    
    
    
      <VisibilityConstraints>
    
        <!--<VisibilityItem guid="guidVSPackage1CmdSet" id="cmdidMyCommand" context="UICONTEXT_SolutionExistsAndNotBuildingAndNotDebugging" />-->
    
      </VisibilityConstraints>
    
    
    
      <CommandPlacements>
    
        <CommandPlacement guid="guidVSPackage1CmdSet" id="cmdidMyCommand" priority="0xF100">
    
          <Parent guid="guidVenusCmdId" id="IDG_VENUS_CTX_REFERENCE"/>
    
        </CommandPlacement>
    
        <CommandPlacement guid="guidVSPackage1CmdSet" id="cmdidMyCommand" priority="0xF100">
    
          <Parent guid="guidVenusCmdId" id="IDG_CTX_REFERENCE"/>
    
        </CommandPlacement>
    
      </CommandPlacements>
    
    
    
    
    
    
    
      <Symbols>
    
        <GuidSymbol name="guidVSPackage1Pkg" value="{d114f193-1e14-46a8-9424-7692a105ea4c}" />
    
    
    
        <GuidSymbol name="guidVSPackage1CmdSet" value="{75ec30c5-b1e9-46b3-98ca-4b10964716cc}">
    
          <IDSymbol name="cmdidMyCommand" value="0x0100" />
    
        </GuidSymbol>
    
    
    
        <GuidSymbol name="guidVenusCmdId" value="{5a9eda61-38de-4fec-a239-87cef6803845}" >
    
          <IDSymbol name="IDG_VENUS_CTX_REFERENCE" value="27" />
    
          <IDSymbol name="IDG_CTX_REFERENCE" value="0x102" />
    
        </GuidSymbol>
    
        <GuidSymbol name="guidReferenceContext" value="{0428d0ef-cd84-4ab3-ade9-d35d20bb3025}">
    
          <IdSymbol name="cmdAddReferenceGroup" value="0x450" />
    
        </GuidSymbol>
    
    
    
        <GuidSymbol name="guidImages" value="{9e979982-8e67-4561-bd70-9776c1adae2e}" >
    
          <IDSymbol name="bmpPic1" value="1" />
    
          <IDSymbol name="bmpPic2" value="2" />
    
          <IDSymbol name="bmpPicSearch" value="3" />
    
          <IDSymbol name="bmpPicX" value="4" />
    
          <IDSymbol name="bmpPicArrows" value="5" />
    
        </GuidSymbol>
    
        <GuidSymbol name="UICONTEXT_SolutionExistsAndNotBuildingAndNotDebugging" value="{3f3bc633-fc7f-48f0-af7f-b1cb56c73a4a}" />
    
      </Symbols>
    
    </CommandTable>


    Friday, September 16, 2011 5:26 AM
  • Where is the group associated with this

    <Parent guid="guidReferenceContext" id="cmdAddReferenceGroup" />

    Also it isn't clear where you are getting these other GUIDs and command ids...they appear to be already defined ones, but things like guidVenusCmdId doesn't appear to match the Venus command GUID (which I believe is: {C7547851-4E3A-4e5b-9173-FA6E9C8BD82C}).  You shouldn't be trying to redefine those symbols 'locally', if you are trying to place an items on the Venus (web dev) context menu you should use the symbols they have already defined (I imagine they should in one of the headers in the SDK).

    Ryan


    Friday, September 16, 2011 5:32 AM
    Moderator
  • I had in fact misunderstood the guids specified in the xml. Specifying the correct guids, made the VSPackage appear! Thank you very much for your help!
    Tuesday, September 20, 2011 6:24 PM