vsixmanifest for all: VS 2010, 2012 and 2013

回眸只為那壹抹淺笑 提交于 2019-11-27 12:45:33

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).

Something like this:

<?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>

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

It is working pretty good (Thanks a lot to Igal), if the VSIX is developed in VS 2012, and installed in VS 2015. However, the reverse is not working (means developed in VS 2015 and try to install in VS 2012) After analyzed Activitylog .xml, i found a work around

Could not load file or assembly 'Microsoft.VisualStudio.Shell.14.0, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies.

Workaround I did Remove VisualStudio.Shell.14.0 and Install VisualStudio.Shell.11.0 using Package manager console (Install-Package VSSDK.Shell.11), and installed in VS 2012. Now Working as expected

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!