Visual Studio 2017 is not detected by extensions for installation
Asked Answered
S

6

9

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()
Stere answered 15/3, 2017 at 18:27 Comment(1)
Big changes in VS2017, they really did have to fix the massive installer problems that VS2015 suffered from. Basic MSDN article is here. Quoting "All VSIX projects will require a major version one-way upgrade to Visual Studio 2017".Silva
B
3

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.

Bwana answered 16/3, 2017 at 4:2 Comment(2)
I don't get the instructions..., improve them please. What do you refer to when you talk about running it with Roslynator?Syllabize
@ArielAltamirano Run "[full_path]\VSIXInstaller.exe Roslynator.VisualStudio.1.2.51.vsix"Bwana
M
2

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.

Melvinmelvina answered 16/3, 2017 at 1:33 Comment(0)
P
2

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.

Piragua answered 15/6, 2017 at 19:58 Comment(0)
H
1

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,...

Hydrophilous answered 22/5, 2017 at 8:38 Comment(0)
F
0

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

Filigree answered 28/2, 2019 at 16:13 Comment(0)
E
-2

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

Expansible answered 15/3, 2017 at 22:23 Comment(2)
General answer like that is out of date.Melvinmelvina
@LexLi I agree in part, I was trying to give a general advise (and didn't pretend to be an expert on VS2017 either). On the other side extension does work nicely on 2017, on good deal of machines at least, and given it's open source, it might be up to the OP to try and fix his setup issues (that's why compiling comes in handy). Also, I did unzip .vsix and all apparently seems in order, so no obvious (to me) issues, targeting etc. Also vsix doesn't warn of dependency issues. Lastly installing full SDK might also help fix some possible issues. I.e. I don't see other links here more helpful.Expansible

© 2022 - 2024 — McMap. All rights reserved.