0

We have a Visual Studio Extension that we host in a private gallery. Having installed the initial version, if one returns to the Extension And Updates page, one sees it listed in the list of Installed extensions. Highlighting it shows the [Disable] and [Uninstall] links and in the right-hand pane, one sees the correct 'Created By', 'Date Installed', 'Version' and the 'Automatically update this extension' is checked.

When we prepare an update, we do the following release process:

  1. In the AssemblyInfo.cs, we update the 'AssemblyVersion' and 'AssemblyFileVersion' to the next version, e.g. "1.12.1.0"
  2. In the source.extension.vsixmanifest, we update the 'Version' to the next version (for which we use the same value, i.e. "1.12.1.0")
  3. We then sign the VSIX package
  4. We then put the VSIX file on our private gallery
  5. We then update the atom.xml file - more on this later. The atom.xml file happens to exist in the same folder as our VSIX since we only have a limited number of these extensions.

However, the extension doesn't automatically update when you start Visual Studio, nor does it appear as an update when you visit the 'Extensions and Updates'. Users therefore have to be notified of the new version and then manually uninstall the existing one, and install the update.

Okay, I'm pretty sure that there is nothing untoward with the VSIX file itself; I suspect the atom.xml may be at fault. There are several posts on how to author the atom.xml file, but there is a little inconsistency between these, e.g. MSDN, justinmchase, Kornfeld Eliyahu Peter, stackoverflow etc.

Okay. Here is my atom.xml (slightly edited)

<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <title type="text">Our Extension Gallery</title>
  <id>uuid:b62cf56a-8a60-4eb6-b217-5e2972e01b39;id=1</id>
  <updated>2017-02-28T11:57:22Z</updated>
  <entry>
    <id>MyAssemblyName.Microsoft.0681eb6c-4275-4d64-9333-dfdabe14f286</id>
    <title type="text">Description One</title>
    <summary type="text">Description Two</summary>
    <published>2017-01-31T11:57:22Z</published>
    <updated>2017-02-28T11:57:22Z</updated>
    <author>
      <name>Me!</name>
    </author>
    <content type="octet/stream" src="http://server/VisualStudioGallery/MyAssemblyName.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>0681eb6c-4275-4d64-9333-dfdabe14f286</Id>
      <Version>1.12.1.0</Version>
    </Vsix>
  </entry>
</feed>

So what of this do we update in the atom.xml?

  • feed/updated
  • feed/entry/updated
  • feed/entry/Vsix/version

Format of the date

  • In some examples I've seen '2011-04-14T14:24:22-07:00', whilst in others I've seen '2012-11-06T22:19:45Z'. Does it matter?

  • I've tried using the "Time" portion as 'T00:00:01Z' just in case there was any confusion between UTC, Server and Client time. No success.

'feed/entry/id' vs 'feed/entry/Vsix/Id'

  • Have I got the casing correct for these XML elements?

  • for 'feed/entry/id', I found that to download I needed to have 'MyAssemblyName.Microsoft.0681eb6c-4275-4d64-9333-dfdabe14f286', but for feed/entry/Vsix/Id it was just '0681eb6c-4275-4d64-9333-dfdabe14f286'.

I feel like I've tinkered with just about every part of the XML but to no avail. I'm sure it's simple....but what that is eludes me.

Thanks

Griff

Community
  • 1
  • 1
DrGriff
  • 4,394
  • 9
  • 43
  • 92

2 Answers2

2
  1. For 'feed/entry/id', which is A unique id of the entry. It MUST be exactly the same as to id of the VSIX package!

  2. For feed/entry/Vsix/Id, which is the id of the VSIX package.

Please modify them as the same as the product id of your vsix package.

enter image description here

Zhanglong Wu - MSFT
  • 1,652
  • 1
  • 7
  • 8
  • Hi Cole - yes, this does indeed match. – DrGriff Mar 01 '17 at 08:41
  • My AssemblyVersion (and AssemblyVersion ) is "1.12.1.0". Should this version go in the Manifest Version too? If not, what is the format of the Manifest Version ("n.n" or "n.n.n.n")? If these differ, then what version should go in the atom.xml? – DrGriff Mar 01 '17 at 09:06
  • Based on your xml file, the value of 'feed/entry/id' and 'feed/entry/Vsix/Id' are diffenert. – Zhanglong Wu - MSFT Mar 01 '17 at 09:57
  • Vsix/Version is the version number of the VSIX package. – Zhanglong Wu - MSFT Mar 01 '17 at 09:59
  • By "version number of the VSIX package", you're referring to what is set in the source.extension.vsixmanifest, right? Can that be the same as the AssemblyVersion, i.e. "1.12.1.0" - does it recognise the 4-part format? – DrGriff Mar 01 '17 at 11:08
  • Hi Cole - based on your feedback, I've managed to fix it. Thanks! – DrGriff Mar 01 '17 at 11:27
0

Thanks to Cole Wu's helpful comments, I finally got this to work.

The two IDs needed to match to get the update to work.

So, just to clarify I have the following:

AssemblyInfo.cs

[assembly: AssemblyVersion("1.15.0.0")]
[assembly: AssemblyFileVersion("1.15.0.0")]

source.extension.manifest

ProductID: MyApplication.Microsoft.0681eb6c-4275-4d64-9333-dfdabe14f286
Version: 1.15

atom.xml

<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <title type="text">Our Extension Gallery</title>
  <id>uuid:b62cf56a-8a60-4eb6-b217-5e2972e01b39;id=1</id>
  <updated>2017-02-28T00:00:01Z</updated>
  <entry>
    <id>MyApplication.Microsoft.0681eb6c-4275-4d64-9333-dfdabe14f286</id>
    <title type="text">Description 1</title>
    <summary type="text">Description 2</summary>
    <published>2017-01-31T00:00:01Z</published>
    <updated>2017-03-01T00:00:01Z</updated>
    <author>
      <name>Me</name>
    </author>
    <content type="octet/stream" src="http://server/VisualStudioGallery/application.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>MyApplication.Microsoft.0681eb6c-4275-4d64-9333-dfdabe14f286</Id>
      <Version>1.15</Version>
    </Vsix>
  </entry>
</feed>
  • feed/entry/id = feed/entry/Vsix/Id = source.extension.manifest.ProductID
  • feed/entry/Vsix/Version = source.extension.manifest.Version
DrGriff
  • 4,394
  • 9
  • 43
  • 92