我在 VS2013 下使用 VSIX 清单设计器。我已经添加微软VisualStudio专业版产品标识符和[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 清单,它与 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
已安装,则会显示它。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)