vsixmanifest面向所有人:VS 2010、2012和2013 [英] vsixmanifest for all: VS 2010, 2012 and 2013

查看:155
本文介绍了vsixmanifest面向所有人:VS 2010、2012和2013的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在VS2013下使用VSIX清单设计器.我添加了 Microsoft.VisualStudio.Pro 产品标识符和 [10.0,13.0) 版本范围来安装目标.尽管如此,我仍然没有将VS2010 Professional视为可用的安装目标:

I'm using VSIX Manifest Designer under VS2013. I've added Microsoft.VisualStudio.Pro product identifier and [10.0,13.0) version range to install targets. Despite that fact, I still don't see my VS2010 Professional as an available installation target:

source.extension.vsixmanifest文件的内容如下所示:

The source.extension.vsixmanifest file content is shown below:

<?xml version="1.0" encoding="utf-8"?>
<PackageManifest Version="2.0.0" xmlns="http://schemas.microsoft.com/developer/vsx-schema/2011" xmlns:d="http://schemas.microsoft.com/developer/vsx-schema-design/2011">
  <Metadata>
    <Identity Id="ae98c9e5-8e14-4c92-b45a-c4fd24a49123" Version="1.0" Language="en-US" Publisher="whosoever" />
    <DisplayName>MyExtension</DisplayName>
    <Description xml:space="preserve">whosoever</Description>
    <MoreInfo>http://www.myextension.com</MoreInfo>
    <License>LICENSE.txt</License>
    <Icon>icon.png</Icon>
    <PreviewImage>screenshot.png</PreviewImage>
  </Metadata>
  <Installation InstalledByMsi="false">
    <InstallationTarget Version="[10.0,13.0)" Id="Microsoft.VisualStudio.Pro" />
  </Installation>
  <Dependencies>
    <Dependency Id="Microsoft.Framework.NDP" DisplayName="Microsoft .NET Framework" d:Source="Manual" Version="4.5" />
    <Dependency Id="Microsoft.VisualStudio.MPF.11.0" DisplayName="Visual Studio MPF 11.0" d:Source="Installed" Version="11.0" />
  </Dependencies>
  <Assets>
    <Asset Type="Microsoft.VisualStudio.VsPackage" d:Source="Project" d:ProjectName="%CurrentProject%" Path="|%CurrentProject%;PkgdefProjectOutputGroup|" />
  </Assets>
</PackageManifest>

应该进行哪些更改才能将该扩展程序安装到VS2010、2012和2013?

What should be changed to enable installation of this extension to VS2010, 2012 and 2013?

推荐答案

您所拥有的是版本2 VSIX清单,该清单与Visual Studio 2010不兼容.更高版本的Visual Studio遵循清单的版本1,因此顺序要通过一个清单支持所有3个Visual Studio版本,则必须将其手动转换为v1.0(并确保不要使用VS2012 +对其进行编辑,否则它将转换回v2.0).

What you have is the version 2 VSIX manifest, which is not compatible with Visual Studio 2010. Later Visual Studio versions respect version 1 of the manifest, so in order to support all 3 Visual Studio versions with a single manifest, you'll have to convert it to v1.0 manually (and make sure NOT to edit it with VS2012+, otherwise it will be converted back to v2.0).

类似这样的东西:

<?xml version="1.0" encoding="utf-8"?>
<Vsix xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Version="1.0.0" xmlns="http://schemas.microsoft.com/developer/vsx-schema/2010">
  <Identifier Id="ae98c9e5-8e14-4c92-b45a-c4fd24a49123">
    <Name>MyExtension</Name>
    <Author>whosoever</Author>
    <Version>1.0</Version>
    <Description xml:space="preserve">Your decription.</Description>
    <Locale>1033</Locale>
    <SupportedProducts>
      <VisualStudio Version="10.0">
        <Edition>Pro</Edition>
      </VisualStudio>
      <VisualStudio Version="11.0">
        <Edition>Pro</Edition>
      </VisualStudio>
      <VisualStudio Version="12.0">
        <Edition>Pro</Edition>
      </VisualStudio>
    </SupportedProducts>
    <SupportedFrameworkRuntimeEdition MinVersion="4.0" />
  </Identifier>
  <Content>
    <VsPackage>|%CurrentProject%;PkgdefProjectOutputGroup|</VsPackage>
    <MefComponent>|%CurrentProject%|</MefComponent>
  </Content>
</Vsix>

您不必指定所有产品版本(称为SKU),只要Pro就足够了,例如,如果安装了Ultimate,它将显示出来.

You don't have to specify all product editions (called SKUs), Pro is enough, if, say, Ultimate is installed, it will be displayed instead.

这篇关于vsixmanifest面向所有人:VS 2010、2012和2013的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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