VSIX 安装程序扩展无法安装在任何当前已安装的产品上

VSIX Installer extension is not installable on any current installed products

我尝试在 visual studio 2017 社区离线安装 objc-syntax-highlighting.vsix。我无法解决它。我已经从 https://github.com/Microsoft/WinObjC/releases 下载扩展包并尝试从 0.2 预览版(2017 年 12 月)

安装包
2/21/2018 11:58:55 AM - Microsoft VSIX Installer 
2/21/2018 11:58:55 AM - -------------------------------------------
2/21/2018 11:58:55 AM - vsixinstaller.exe version:
2/21/2018 11:58:55 AM - 15.5.99+g87f89a485e
2/21/2018 11:58:55 AM - -------------------------------------------
2/21/2018 11:58:55 AM - Command line parameters:
2/21/2018 11:58:55 AM - C:\Program Files (x86)\Microsoft Visual Studio\Installer\resources\app\ServiceHub\Services\Microsoft.VisualStudio.Setup.Service\VSIXInstaller.exe,C:\Users\lenovo\AppData\Local\Temp\Rar$DIa10400.20842\objc-syntax-highlighting.vsix
2/21/2018 11:58:55 AM - -------------------------------------------
2/21/2018 11:58:55 AM - Microsoft VSIX Installer
2/21/2018 11:58:55 AM - -------------------------------------------
2/21/2018 11:58:58 AM - Initializing Install...
2/21/2018 11:58:58 AM - Extension Details...
2/21/2018 11:58:58 AM -     Identifier         : VSIX..9c35fff1-f084-44c1-a38e-68c707163aa2
2/21/2018 11:58:58 AM -     Name               : Objective-C Language Service
2/21/2018 11:58:58 AM -     Author             : Microsoft
2/21/2018 11:58:58 AM -     Version            : 1.5
2/21/2018 11:58:58 AM -     Description        : This package contains Objective-C language service components such as syntax higlighting etc
2/21/2018 11:58:58 AM -     Locale             : en-US
2/21/2018 11:58:58 AM -     MoreInfoURL        : 
2/21/2018 11:58:58 AM -     InstalledByMSI     : False
2/21/2018 11:58:58 AM -     SupportedFrameworkVersionRange : [4.5,)
2/21/2018 11:58:58 AM - 
2/21/2018 11:58:58 AM -     SignatureState     : Unsigned
2/21/2018 11:58:58 AM -     Supported Products : 
2/21/2018 11:58:58 AM -         Microsoft.VisualStudio.Community
2/21/2018 11:58:58 AM -             Version : [12.0,15.0)
2/21/2018 11:58:58 AM -         Microsoft.VisualStudio.Premium
2/21/2018 11:58:58 AM -             Version : [12.0,15.0)
2/21/2018 11:58:58 AM -         Microsoft.VisualStudio.Pro
2/21/2018 11:58:58 AM -             Version : [12.0,15.0)
2/21/2018 11:58:58 AM -         Microsoft.VisualStudio.Ultimate
2/21/2018 11:58:58 AM -             Version : [12.0,15.0)
2/21/2018 11:58:58 AM -         Microsoft.VisualStudio.Enterprise
2/21/2018 11:58:58 AM -             Version : [12.0,15.0)
2/21/2018 11:58:58 AM - 
2/21/2018 11:58:58 AM -     References         : 
2/21/2018 11:58:58 AM - Signature Details...
2/21/2018 11:58:58 AM -     Extension is not signed.
2/21/2018 11:58:58 AM - 
2/21/2018 11:58:58 AM - Searching for applicable products...
2/21/2018 11:58:58 AM - Found installed product - Global Location
2/21/2018 11:58:58 AM - Found installed product - Visual Studio Community 2017
2/21/2018 11:58:58 AM - VSIXInstaller.NoApplicableSKUsException: This extension is not installable on any currently installed products.
at VSIXInstaller.App.GetInstallableData(String vsixPath, Boolean isRepairSupported, IEnumerable`1& skuData)
at VSIXInstaller.App.Initialize(Boolean isRepairSupported)
at VSIXInstaller.App.Initialize()
at System.Threading.Tasks.Task`1.InnerInvoke()
at System.Threading.Tasks.Task.Execute()

谁能帮我解决这个问题?

该包只能在VS 2015及更早版本安装,请作者更新

您使用了错误的扩展名。对于 Visual Studio 2017,请安装支持 VS2015 和 Visual Studio 2017 的 objc-language-services-VS2017.vsix

查看您包含的日志文件,您的计算机上安装了 VS2017 Community,我们可以在日志文件的后半部分看到这一点。从日志的中间我们可以看到这个扩展在 VS2012 和 VS2015 community/ultimate/premium/professional/enterprise 上受支持。因此您会收到错误消息:

This extension is not installable on any currently installed products.

解决方法是直接下载VS2017 Community的扩展版本。

然而,如果这不能解决问题,there is a solution to a similar issue here

上述解决方案的要点是:

  • 事实证明 .vsix 扩展只是一个 .zip 文件。
  • 将扩展名从 .vsix 重命名为 .zip
  • 在文件夹中找到名为 extension.vsixmanifest 的文件,然后在记事本等文本编辑器中打开它。
  • 使用 Ctrl + F 找到 Supported Products 部分。
  • 添加以下内容:
    <VisualStudio Version="15.0"> <!-- VS2017 -->
       <Edition>Community</Edition>
       <Edition>Ultimate</Edition>
       <Edition>Premium</Edition>
       <Edition>Pro</Edition>
    </VisualStudio>
  • 保存并关闭文件。
  • 将扩展名从 .zip 重命名回 .vsix
  • 双击运行。