Reputation: 6963
New VSIX release notifications are seen within Visual Studio automatically based on Atom Feeds, which are most often hosted in a Web API, is it possible to just build the project and include the Atom XML markup in the build folder and use that content for Visual Studio to notify of new extensions (on that computer)?
I ask this as a developer of VSIX plug-ins who currently does not have access to a web server in corporate environment. I can create a Web API running on my local machine for the Atom feed, but before I do that I was wondering if I even need to do that?
Please advise.
Upvotes: 1
Views: 115
Reputation: 6963
You can host VSIX extensions using just the file system.
Here's the technique:
Create the Atom Feed first, name it Atom.xml
You can, put it into the same project where the extension is developed. This makes it easy to update it when changes are made.
<?xml version="1.0" encoding="utf-8" ?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title type="text" />
<id>bcecded5-97c8-4d24-96f1-6347778</id>
<updated>2016-09-30T14:08:00-07:00</updated>
<entry>
<id>PluginName.Author Name.3d71e2fe-5771-4bb6-837c-192a7cce378e</id>
<title type="text">PluginName</title>
<summary type="text">Advertisement on what this plug in does</summary>
<published>2016-09-30T14:08:00-07:00</published>
<updated>2016-09-30T14:08:00-07:00</updated>
<author>
<name>Author Name</name>
</author>
<content type="application/octet-stream" src="MagenicS2.vsix" />
<Vsix xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://schemas.microsoft.com/developer/vsx-syndication-schema/2010">
<Id>PluginName.Author Name.3d71e2fe-5771-4bb6-837c-192a7cce378e</Id>
<Version>1.7</Version>
<References />
<Rating xsi:nil="true" />
<RatingCount xsi:nil="true" />
<DownloadCount xsi:nil="true" />
</Vsix>
</entry>
</feed>
The feed container attributes are:
The Entry Section
The attributes are the same as are configured in the VSIXManifest file: ID-This is the Product ID as found in the VSIXManifest of the plug in. Version-If this value changes Visual Studio will advertise a new version is ready to be installed.
Determine where the file share will be hosted
OneDrive works nicely and gives you control over who gets the plug-in.
C:\Users\UserName\OneDrive\Publish\PluginName
Post-Build Event Command Line
In the VSIX project go to Properties/Build Events and put this into the Post-Build Event command line text area:
xcopy /Y /Q "$(TargetDir)PluginName.vsix" "C:\Users\UserName\OneDrive\Publish\PluginName\PluginName.vsix"
xcopy /Y /Q "$(TargetDir)atom.xml" "C:\Users\UserName\OneDrive\Publish\PluginName\atom.xml"
This allows the build to publish the content and will publish both Debug and Release versions each time you build.
The Publish Folder Content
This folder needs just two items:
How to Install
The users will need to click on VSIX file to get the first install, from there on, Visual Studio will automatically look for updates once the configuration is complete.
How to Configure VS to look for updates
In VS go to Tools/Extensions and Updates then click on "Change you Extensions and Update settings".
Click the add button and put in a name:
Testing Updates
Upvotes: 2