我正在尝试安装仅在 Visual Studio 2017 上支持的扩展。我使用的是 Professional,并且从未安装过 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()
最佳答案
从日志文件来看,旧的 vsixinstaller.exe 尝试安装您的扩展,而不是 VS 2017 中的扩展。它应该位于类似的路径中 “C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\VSIXInstaller.exe”
尝试使用 Roslynator.VisualStudio.1.2.51.vsix 作为参数显式运行它。
关于visual-studio - 安装扩展未检测到 Visual Studio 2017,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42817874/