22

VS2013 で VSIX マニフェスト デザイナーを使用しています。インストール ターゲットに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 にインストールできるようにするには、何を変更する必要がありますか?

4

2 に答える 2

31

What you have is the version 2 VSIX manifest, which is not compatible with Visual Studio 2010. それ以降の Visual Studio バージョンではマニフェストのバージョン 1 が尊重されるため、単一のマニフェストで 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がインストールされている場合は、代わりに表示されます。

于 2014-03-27T13:18:31.363 に答える