locked
Adding Private Gallery using VSIX RRS feed

  • Question

  • Hi,

    We have set up a private gallery for our internal Visual studio source control plugin. I am able to add the gallery manually using extension manager.

    The requirement is to add this private gallery to Extension Manager automatically when they first install the VSIX plugin. (I am not sure whether VSIX allows this)

    I created a pkgdef file in my project with properties "Build Action:Content" and "Include in VSIX" 

    [$RootPath$\ExtensionManager\Repositories\{93a69fb5-58b6-4b2b-9f90-5d7abce1b90f}]
    @="http://privategallery/atom.html"
    "Priority"="30"
    "Protocol"="Atom"
    "DisplayName"="Private Gallery"

    And in the manifest file, I added this as an asset.

    <Assets>
    <Asset Type="Microsoft.VisualStudio.VsPackage" Path="MyPackage.pkgdef" />
    <Asset Type="Microsoft.VisualStudio.VsPackage" d:Source="File" Path="privategallery.pkgdef" />
    </Assets> 

    But the second pkgdef file is not considered and I dont see the private gallery created.

    Thanks,

    Rajiv.

    Friday, September 5, 2014 8:31 PM

Answers

  • Hi Rajiv,

    Your pkgdef file has some errors, the correct one should resemble this:

    [$RootKey$\ExtensionManager\Repositories\{bcecded5-97c8-4d24-96f1-7d9e16652433}]
    @="file:///E:/PrivateGalleryTest/atom.xml"
    "Priority"=dword:0000001e
    "Protocol"="Atom Feed"
    "DisplayName"="Private Gallery"

    I don't know why MSDN document use $RootPath$ as the root registry hive, but it's wrong, we should use $RootKey$ instead. The value for the Priority property should be of type dword, by default it's "REG_SZ". Protocol should be "Atom Feed" or "Sharepoint".

    You could just use the manifest file designer of the VSPackage project to modify the manifest file, add an Assert to the privategallery.pkgdef file.

    Install the built VSIX file, then restart the VS IDE, you'll find that both the package and the registry hive of the Private Gallery are installed.

    For more information, please check this document:

    http://msdn.microsoft.com/en-us/library/hh266746.aspx


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    • Edited by Caillen Wednesday, September 10, 2014 4:57 PM
    • Marked as answer by rajivharris2 Thursday, September 11, 2014 4:53 PM
    Wednesday, September 10, 2014 4:54 PM

All replies

  • Hi Rajiv,

    Your pkgdef file has some errors, the correct one should resemble this:

    [$RootKey$\ExtensionManager\Repositories\{bcecded5-97c8-4d24-96f1-7d9e16652433}]
    @="file:///E:/PrivateGalleryTest/atom.xml"
    "Priority"=dword:0000001e
    "Protocol"="Atom Feed"
    "DisplayName"="Private Gallery"

    I don't know why MSDN document use $RootPath$ as the root registry hive, but it's wrong, we should use $RootKey$ instead. The value for the Priority property should be of type dword, by default it's "REG_SZ". Protocol should be "Atom Feed" or "Sharepoint".

    You could just use the manifest file designer of the VSPackage project to modify the manifest file, add an Assert to the privategallery.pkgdef file.

    Install the built VSIX file, then restart the VS IDE, you'll find that both the package and the registry hive of the Private Gallery are installed.

    For more information, please check this document:

    http://msdn.microsoft.com/en-us/library/hh266746.aspx


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    • Edited by Caillen Wednesday, September 10, 2014 4:57 PM
    • Marked as answer by rajivharris2 Thursday, September 11, 2014 4:53 PM
    Wednesday, September 10, 2014 4:54 PM
  • Hi Caillen,

    I've created a pkgdef just for the Private Gallery... 

    [$RootKey$\ExtensionManager\Repositories\{BB361B34-758B-4511-A168-7CE50E4096C6}] 
    @={file://tfsitsd/TFS_VSIX_D000/atom.xml}  (REG_SZ) 
    "Priority"=dword:0000001e 
    "Protocol"="Atom Feed" 
    "DisplayName"="AG Gallery Development"

    I then copy the pkgdef file into the VS2017 install directory:  C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\Extensions

    then touch the extensions.configurationchanged file...

    upon opening VS 2017 I check the Tools/Options/ Extensions & Updates but the Private gallery is not listed.  What am I missing?  Should I be created a vsix for the private gallery pkgdef?

    Ok i used devenv/log and found the following...  looks like i am missing the quotes.  :)

    PkgDef syntax or I/O error at line 2: Value: unrecognized data type specifier
              @=file://tfsitsd/TFS_VSIX_D000/atom.xml

    Now I notice that the copying just the pkgdef into the

    C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\Extensions directory registers the private gallery if I go to Tools/Extensions and Updates.  If I however go to Tools/Options/Environment/Extensions and Updates the additional private gallery is not listed.  Not sure if its necessary I thought however it would show up there.

    Thanks,

    Jonathan


    10



    • Edited by BigBro Tuesday, August 1, 2017 6:52 AM
    Monday, July 31, 2017 2:45 PM