I'm trying to install an extension that's only supported on Visual Studio 2017. I'm using Professional, and I never had the RC installed, only the RTM version. VS 2017 isn't detected, however (see install log below). Other extensions install just fine, presumably because they also support VS 2015, which I do have installed. Those extensions do show up in both 2015 and 2017.
I tried a repair install, then completely uninstalling and reinstalling, but nothing has fixed the problem. The specific extension is Roslynator 2017.
How can I fix this so VS 2017 is detected and I can install extensions for it?
Install log:
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()
As Hans Passant commented, huge changes have been made by Microsoft on the installation, so previous approaches of detecting VS won't work any more. For example, to detect VS installation folder, now a few extra tools or scripts are required,
https://github.com/Microsoft/vswhere
So guides such as How to: Migrate Extensibility Projects to Visual Studio 2017 are critical and you can follow the tips.
From the log file it looks like an older vsixinstaller.exe tried to install your extension, not the one from VS 2017. It should be in a path like "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\VSIXInstaller.exe"
Try to explicitly run it with Roslynator.VisualStudio.1.2.51.vsix as a parameter.
Press Win+R and write the path to correct version VSIXIntaller. for example.
"E:\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\VSIXInstaller.exe" "C:\Users\jdonoso.IMLG\Downloads\Ankh.VS15Package.vsix"
I have 3 versions of Visual Studio, but the correct installer is VS2017 since the package is for VS2017. Take this into consideration.
That's why I had the same mistake. Solve it using the correct version.
There are two locations of VSIXInstaller
The obviously supposed one: "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\VSIXInstaller.exe"
And the location we want to use: "C:\Program Files (x86)\Microsoft Visual Studio\Installer\resources\app\ServiceHub\Services\Microsoft.VisualStudio.Setup.Service\VSIXInstaller.exe"
After i have startet the VSIXInstaller via the second path, i could install any VSIXPlugin via the PowerShell and ith silent option
For Example: $arguments = "/q","/nr","/admin","/logFile:TFSSCExplorerExtension.log","\sp057\Projekte\IKT\TFSSCExplorerExtension.vsix" & "C:\Program Files (x86)\Microsoft Visual Studio\Installer\resources\app\ServiceHub\Services\Microsoft.VisualStudio.Setup.Service\VSIXInstaller.exe" $arguments
Extensions have to be recompiled specifically for each VS version, the referenced VS DLL-s are different, so whether it's working on 2015 or not should matter very little.
a) You could try contacting the author (opening an issue or so) which is probably the best.
b) Or one thing that might work is trying to recompile the source yourself as that may filter out possible versioning quirks. That helped me a few times. You'd need to add to your setup the "Visual Studio extension development" under "Other Toolsets" (just rerun the setup file and Modify) and you should be able to build the code (each extension may have some specifics though). Given that the tool is open source that's probably the route I'd take.
As for the reasons why (you might be experiencing the issues) it's hard to say, I've had some problems with one of the extensions myself, it could be a bug (as 2017 is still a bit fresh), it could be some sort of DLL versioning issues, it could be your setup. So you could also try a fresh install or...
c) try it on another machine is always helpful
Maybe you "only" have to use the right installer. The one for Visual Studio 2107. So your path should list C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE before any other VS Version.
Professional must be replaced with the installed one. Enterprise, Ultimate,...