更新Private Gallery原子,以使VS显示扩展更新可用 [英] Update Private Gallery atom such that VS shows that an extension update is available

查看:119
本文介绍了更新Private Gallery原子,以使VS显示扩展更新可用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Visual Studio 私有Gallery 来发布我公司内部的VSIX.我的VSIX显示在Visual Studio 2012的扩展和更新"的在线"部分中,我可以从那里安装它:

I'm using a Visual Studio Private Gallery to publish a VSIX internal to my company. My VSIX shows up in the "Online" section of "Extensions and Updates" in Visual Studio 2012 and I can install it from there:

但是,一旦安装了扩展程序,就无法确定如何以使其在同一对话框的更新"部分中显示的方式来更新扩展程序,也无法确定如何制作Visual Studio.通知我有可用的更新.

However, once it's installed, I can't figure out how to update my extension in a way that makes it show up in the "Updates" section of that same dialog box, nor can I figure out how to make Visual Studio notify me that an update is available.

我尝试了以下各项的各种组合:

I've tried various combinations of the following:

  1. 增加VSIX本身和atom.xml中的版本号
  2. entry标记内的updated标记更改为当前日期和时间
  3. feed标记内的updated标记更改为当前日期和时间
  4. entry标记内的published标记更改为当前日期和时间
  1. Increasing the version number in the VSIX itself and in the atom.xml
  2. Changing the updated tag inside of the entry tag to the current date and time
  3. Changing the updated tag inside of the feed tag to the current date and time
  4. Changing the published tag inside of the entry tag to the current date and time

我期望1、2和3的组合足以显示有更新,但无济于事. 本指南似乎证实了我的期望:

My expectation was that a combination of 1, 2, and 3 should be enough to show that there is an update, but to no avail. This guide seems to confirm my expectation:

  • 已发布-添加扩展名的日期/时间.
  • 已更新-扩展名上次更新的日期/时间.
  • Published - The date/time when the extension was added.
  • Updated - The date/time when the extension was last updated.

我也同时尝试了所有4种方法,但是都无济于事.

I've also tried all 4 at the same time, also to no avail.

我正在从一个Apache实例提供图片库,并且我已经确认它正在为atom.xml设置正确的Last-Modified标头.

I'm serving the gallery from an Apache instance, and I've confirmed that it's setting a correct Last-Modified header for the atom.xml .

Visual Studio是否每隔一段时间检查一次更新?打开扩展和更新"的更新"部分是否不会强制Visual Studio进行检查?

Is there some interval at which Visual Studio checks for updates? Does opening the "Updates" section of "Extensions and Updates" not force Visual Studio to check?

这是我的atom.xml的内容:

Here's the contents of my atom.xml:

<?xml version="1.0" encoding="utf-8" ?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <title type="text">Visual Studio Extension Gallery</title>
  <id>uuid:CDC295B0-7885-4B59-9BDF-F059A9F4B338;id=1</id>
  <updated>2013-12-11T19:00:00Z</updated>
  <entry>
    <id>MyVSIX..b242c6de-d0a6-4ba1-9672-b866e36607d3</id>
    <title type="text">MyVSIX</title>
    <summary type="text">MyVSIX is a nifty extension that does things.</summary>
    <published>2013-12-11T19:00:00Z</published>
    <updated>2013-12-11T19:00:00Z</updated>
    <author>
      <name>daxelrod</name>
    </author>
    <content type="application/octet-stream" src="vsix/MyVSIX.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>MyVSIX..b242c6de-d0a6-4ba1-9672-b866e36607d3</Id>
      <Version>0.5</Version>
      <References />
      <Rating xsi:nil="true" />
      <RatingCount xsi:nil="true" />
      <DownloadCount xsi:nil="true" />
    </Vsix>
  </entry>
</feed>

我还应该注意,我的扩展名不是强名称签名",因为它使用了未签名的第三方程序集.会有所不同吗?

I should also note that my extension is not Strong Name Signed, because it uses a third party assembly that is unsigned. Does that make a difference?

推荐答案

我遇到了同样的问题,并进行了深入调查.就我而言,奇怪的是,我的扩展名总是在私人图库"中显示为下载",而不是已安装"(绿色钩子).所以我猜画廊项目和已安装项目之间缺少链接

I had the same Issue and made some deep investigation. In my case it was odd, that my extension always shown as "Download" in the Private Gallery instead as "Installed" (the Green Hook). So I guessed there is a missing Link between the Gallery item and the installed Item

答案很烦人:

该ID必须为该ID" . 因此,产品ID(在VSIX配置中)是必须在Atom文件中的参考.

The ID has to be "THE ID". So the Product ID (in the VSIX Configuration) is the reference which has to be in the Atom-File.

在您的情况下:

<Vsix>
    <Id>b242c6de-d0a6-4ba1-9672-b866e36607d3</Id>
</Vsix>

如您所见:不用"MyVSIX ..". 之后,它将识别您的扩展程序,并且如果安装了扩展程序,还将在图库中隐藏下载"按钮

As you see: Withyout your "MyVSIX..". After that it will recognize your Extension and if installed also hide the "Download" Button within the Gallery

用于更新:

增加<版本> 内容.

对于更新周期(我的经验):

  • 它会检查Visual Studio的启动(如果启用了Option,则每天检查一次)
  • 每次打开扩展和更新"时,它都会进行检查.因此,保存XML后重新打开就足够了.

(感谢Upvote)

为了更好地理解这些图片(在VS2013中制作,但在VS2012中几乎相同)

Here the Pictures for better understaning (made in VS2013, but almost same for VS2012)

VSIX文件中的ID.

The ID in the VSIX File.

它在Atom-Feed文件中的外观如何.

How it should look like in the Atom-Feedfile.

<Vsix>
    <Id>d4d50729-a612-4260-9b2e-3a61ad5e2207</Id>
</Vsix>   

如果在Gallery和VSIX File之间正确链接,应该如何显示.

How it should look if you correctly linked between Gallery and VSIX File.

这篇关于更新Private Gallery原子,以使VS显示扩展更新可用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆