我正在尝试安装一个只支持Visual 2017的扩展。我使用专业,我从来没有安装RC,只有RTM版本。但是,未检测到VS 2017 (请参见下面的安装日志)。其他扩展安装得很好,大概是因为它们也支持VS 2015,我已经安装了。这些扩展确实出现在2015年和2017年。
我尝试了一个修复安装,然后完全卸载和重新安装,但什么也没有解决问题。特定的扩展是Roslynator 2017。
我如何解决这个问题,以便检测到VS 2017,并为其安装扩展?
安装日志:
3/15/2017 2:21:53 PM - Microsoft VSIX Installer
3/15/2017 2:21:53 PM - -------------------------------------------
3/15/2017 2:21:53 PM - Initializing Install...
3/15/2017 2:21:54 PM - Extension Details...
3/15/2017 2:21:54 PM - Identifier : 9289a8ab-1bb6-496b-9992-9f7ea27f66a8
3/15/2017 2:21:54 PM - Name : Roslynator 2017
3/15/2017 2:21:54 PM - Author : Josef Pihrt
3/15/2017 2:21:54 PM - Version : 1.2.51
3/15/2017 2:21:54 PM - Description : A collection of 170+ analyzers and 170+ refactorings for C#, powered by Roslyn.
3/15/2017 2:21:54 PM - Locale : en-US
3/15/2017 2:21:54 PM - MoreInfoURL : http://github.com/JosefPihrt/Roslynator
3/15/2017 2:21:54 PM - InstalledByMSI : False
3/15/2017 2:21:54 PM - SupportedFrameworkVersionRange : [4.6,)
3/15/2017 2:21:54 PM -
3/15/2017 2:21:54 PM - SignatureState : Unsigned
3/15/2017 2:21:54 PM - Supported Products :
3/15/2017 2:21:54 PM - Microsoft.VisualStudio.Community
3/15/2017 2:21:54 PM - Version : [15.0,16.0)
3/15/2017 2:21:54 PM - Microsoft.VisualStudio.Pro
3/15/2017 2:21:54 PM - Version : [15.0,16.0)
3/15/2017 2:21:54 PM - Microsoft.VisualStudio.Enterprise
3/15/2017 2:21:54 PM - Version : [15.0,16.0)
3/15/2017 2:21:54 PM -
3/15/2017 2:21:54 PM - References :
3/15/2017 2:21:54 PM - -------------------------------------------------------
3/15/2017 2:21:54 PM - Identifier : Microsoft.VisualStudio.MPF.15.0
3/15/2017 2:21:54 PM - Name : Visual Studio MPF 15.0
3/15/2017 2:21:54 PM - Version : [15.0,16.0)
3/15/2017 2:21:54 PM - MoreInfoURL :
3/15/2017 2:21:54 PM - Nested : No
3/15/2017 2:21:54 PM -
3/15/2017 2:21:54 PM - Signature Details...
3/15/2017 2:21:54 PM - Extension is not signed.
3/15/2017 2:21:54 PM -
3/15/2017 2:21:54 PM - Searching for applicable products...
3/15/2017 2:21:54 PM - Found installed product - Microsoft Visual Studio Enterprise 2015
3/15/2017 2:21:54 PM - Found installed product - Microsoft Visual Studio Professional 2015
3/15/2017 2:21:54 PM - Found installed product - Microsoft Visual Studio Community 2015
3/15/2017 2:21:54 PM - Found installed product - Microsoft Visual Studio 2015 Shell (Integrated)
3/15/2017 2:21:54 PM - Found installed product - Global Location
3/15/2017 2:21:54 PM - VSIXInstaller.NoApplicableSKUsException: This extension is not installable on any currently installed products.
at VSIXInstaller.App.InitializeInstall(Boolean isRepairSupported)
at VSIXInstaller.App.InitializeInstall()
at System.Threading.Tasks.Task.InnerInvoke()
at System.Threading.Tasks.Task.Execute()发布于 2017-03-16 04:02:37
从日志文件看,似乎是一个较旧的vsixinstaller.exe试图安装您的扩展名,而不是VS 2017的扩展名。它应该位于"C:\Program (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\VSIXInstaller.exe“”这样的路径中。
尝试使用Roslynator.VisualStudio.1.2.51.v6作为参数显式运行它。
发布于 2017-03-16 01:33:17
正如Hans评论的那样,微软已经在安装上做了巨大的改变,所以以前检测VS的方法已经不再起作用了。例如,要检测VS安装文件夹,现在需要一些额外的工具或脚本,
https://github.com/Microsoft/vswhere
因此,像如何:将可扩展项目迁移到Visual 2017这样的指南是关键的,您可以遵循这些技巧。
发布于 2017-06-15 19:58:30
按Win+R并编写路径以更正VSIXIntaller版本。例如。
"E:\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\VSIXInstaller.exe“"C:\Users\jdonoso.IMLG\Downloads\Ankh.VS15Package.vsix”
我有3个版本的Visual,但正确的安装程序是VS2017,因为包是用于VS2017的。把这个考虑进去。
所以我也犯了同样的错误。用正确的版本解决它。
https://stackoverflow.com/questions/42817874
复制相似问题