{"id":225676,"date":"2019-06-11T08:00:17","date_gmt":"2019-06-11T15:00:17","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/visualstudio\/?p=225676"},"modified":"2019-06-10T09:13:52","modified_gmt":"2019-06-10T16:13:52","slug":"create-a-private-gallery-for-self-hosted-visual-studio-extensions","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/visualstudio\/create-a-private-gallery-for-self-hosted-visual-studio-extensions\/","title":{"rendered":"Create a private gallery for self-hosted Visual Studio extensions"},"content":{"rendered":"<p>Most Visual Studio extension authors publish their extensions to the public Marketplace to allow everyone to install them and benefit from the large and open ecosystem. However, some companies create extensions for internal use only. A private gallery allows them to distribute the extensions easily with the same auto-update capabilities enjoyed by any public Marketplace extension. And now, we&#8217;ve streamlined the process even more so that you can easily create a private gallery for your team or organization.<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-225679\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2019\/06\/private-gallery-online-tab.png\" alt=\"\" width=\"933\" height=\"382\" srcset=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2019\/06\/private-gallery-online-tab.png 933w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2019\/06\/private-gallery-online-tab-300x123.png 300w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2019\/06\/private-gallery-online-tab-768x314.png 768w\" sizes=\"(max-width: 933px) 100vw, 933px\" \/><\/p>\n<p>Visual Studio 2010 introduced support for private galleries, but few used them due to lacking samples and tooling. A lot has changed since then and the private gallery support has seen several updates to support extension packs and other more recent features.<\/p>\n<h2>The anatomy of a private gallery<\/h2>\n<p>A private gallery is an <a href=\"https:\/\/docs.microsoft.com\/visualstudio\/extensibility\/how-to-create-an-atom-feed-for-a-private-gallery\">ATOM feed XML File<\/a> that contains meta data about the extensions. Registering the gallery with Visual Studio can be done either by the user manually under <strong>Tools -&gt; Options<\/strong> or by an extension using a custom .pkgdef file (<a href=\"https:\/\/github.com\/madskristensen\/VsixGalleryExtension\/blob\/master\/src\/feed.pkgdef\">example<\/a>).<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-225678\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2019\/06\/extension-options.png\" alt=\"\" width=\"967\" height=\"696\" srcset=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2019\/06\/extension-options.png 967w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2019\/06\/extension-options-300x216.png 300w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2019\/06\/extension-options-768x553.png 768w\" sizes=\"(max-width: 967px) 100vw, 967px\" \/><\/p>\n<p>The ATOM feed can be located on a web server, file system or file share. After registering the gallery, a new category appears under the <em>Online<\/em> tab in the Extension Manager dialog as shown in the first screenshot above.<\/p>\n<h2>Create the ATOM feed<\/h2>\n<p>The open source tool <a href=\"https:\/\/github.com\/madskristensen\/PrivateGalleryCreator\">Private Gallery Creator<\/a> makes it straightforward to create the ATOM feed. Download the executable and run it in a folder containing the VSIX files you wish to include in the feed. The tool analyzes the VSIX files and extracts the metadata needed to produce a file called feed.xml in the same folder.<\/p>\n<p>You could also set up a CI\/CD pipeline that automatically executes the tool to update the feed. In addition, the tool has a \u201cwatch\u201d feature to automatically produce a new feed any time a VSIX file is added or modified in the same folder.<\/p>\n<h2>Set it up in only four steps<\/h2>\n<p>Here\u2019s a recap of how to set up a private gallery:<\/p>\n<ol>\n<li>Put your .vsix files into an empty folder accessible to all consumers of the gallery<\/li>\n<li><a href=\"https:\/\/github.com\/madskristensen\/PrivateGalleryCreator\/releases\">Download PrivateGalleryCreator.exe<\/a> executable into the same folder<\/li>\n<li>Double-click PrivateGalleryCreator.exe to produce the feed.xml file<\/li>\n<li>Register the feed in Visual Studio manually or from an extension\u2019s .pkgdef file<\/li>\n<\/ol>\n<h2>In summary<\/h2>\n<p>You can learn more about private galleries from the <a href=\"https:\/\/docs.microsoft.com\/visualstudio\/extensibility\/private-galleries\">documentation<\/a> and by checking the <a href=\"https:\/\/github.com\/madskristensen\/PrivateGalleryCreator\/releases\">Private Gallery Creator project on GitHub<\/a>. There are a few public offerings for hosted private galleries such as <a href=\"https:\/\/www.myget.org\/vsix\">MyGet<\/a> and <a href=\"http:\/\/vsixgallery.com\/\">Open VSIX Gallery<\/a> that may be worth looking into as well.<\/p>\n<p>We\u2019d love to hear about how you use private galleries today or why you don\u2019t use them, so please sound off in the comments below.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Most Visual Studio extension authors publish their extensions to the public Marketplace to allow everyone to install them and benefit from the large and open ecosystem. However, some companies create extensions for internal use only. A private gallery allows them to distribute these extensions with ease.<\/p>\n","protected":false},"author":642,"featured_media":225679,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1388,155],"tags":[294,12],"class_list":["post-225676","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-extensibility","category-visual-studio","tag-extensions","tag-visual-studio"],"acf":[],"blog_post_summary":"<p>Most Visual Studio extension authors publish their extensions to the public Marketplace to allow everyone to install them and benefit from the large and open ecosystem. However, some companies create extensions for internal use only. A private gallery allows them to distribute these extensions with ease.<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/posts\/225676","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/users\/642"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/comments?post=225676"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/posts\/225676\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/media\/225679"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/media?parent=225676"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/categories?post=225676"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/tags?post=225676"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}