visual-studio - vsixmanifest面向所有人:VS 2010、2012和2013

标签 visual-studio manifest vsix vsixmanifest

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

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

<?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,应进行哪些更改?

最佳答案

您拥有的是版本2 VSIX list ,该 list 与Visual Studio 2010不兼容。更高版本的Visual Studio遵循 list 的版本1,因此,为了通过单个 list 支持所有3个Visual Studio版本,您必须手动将其转换为v1.0(并确保不要使用VS2012 +对其进行编辑,否则它将转换回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,它将显示出来。

关于visual-studio - vsixmanifest面向所有人:VS 2010、2012和2013,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22688715/

相关文章:

c# - 我如何告诉 VS2010 在我的 list 中包含文件以进行发布?

Java 忽略 jar 文件 list 中的类路径条目

c# - 在我的 VS 扩展中,如何在 Visual Studio 2015/2017 中以编程方式预览文件?

visual-studio-2010 - 如何使用 WIX 自动安装 VSIX 包?

c++ - C++ 标准版本与 Visual Studio 版本

c# - wiimote中加速度计的刷新率是多少?

javascript - iPhone 缓存 list 设置

visual-studio - 更新 Private Gallery atom,以便 VS 显示扩展更新可用

找不到 XML 注释文件 - Swagger

带有 ostream 运算符的 C++ 类可与 VS 一起使用,但无法使用 gcc 进行编译