none
Does VSIXInstaller.exe's /skuName argument work like the <Edition> tag in the .vsixmanifest file?

    Question

  • I use version 1 of the .vsixmanifest file, and in the supported products, I have this:

    <SupportedProducts> <VisualStudio Version="10.0"> <Edition>Pro</Edition>
    </VisualStudio>

    From what I understand, including just the lowest edition (Pro) is enough to support all higher editions.

    VSIXInstaller.exe takes a /skuName argument, valid values include "Pro".

    I use the silent VSIXInstaller.exe from my installer. Is it good enough I call it with /skuName:Pro and expect it to work with all higher editions?

    Specifically, if the machine had Premium, will VSIXInstaller /skuName:Pro still install against it?

    Thank you!

    Monday, February 20, 2017 10:21 AM

Answers

All replies

  • Hi,

    No, VSIXInstaller requires the exact target Edition/Version. If you have a VSIX that targets Pro or higher (and therefore it uses "Pro" in the manifest) and you execute:

    vsixinstaller.exe /skuName:Pro /skuVersion:15.0 MyPackage.vsix

    on a machine with VS 2017 (15.0) Enterprise edition you get:

    Using the following would work:

    vsixinstaller.exe /skuName:Enterprise /skuVersion:15.0 MyPackage.vsix


    My portal and blog about VSX: http://www.visualstudioextensibility.com<br/> Twitter: https://twitter.com/VSExtensibility<br/> MZ-Tools productivity extension for Visual Studio: https://www.mztools.com


    Monday, February 20, 2017 2:04 PM
    Moderator
  • Thanks Carlos, I should have done this earlier, but after I posted the question, I tried it for myself, with Visual Studio 2015. I installed VS 2015 Enterprise, and when I run VSIXInstaller without the /sku arguments, I see this:

    And, when I run with the arguments /skuName:Pro /skuVersion:14.0, I see this:


    If I proceed, I see the extension gets installed just fine with method 2 on VS 2015 Enterprise. Was the behavior you see specific to VS 2017, I am confused?


    Tuesday, February 21, 2017 7:00 AM
  • In VS2017 several editions can coexist on the same machine: Enterprise, Professional,Community so the behavior seems to have changed and you need to target specifically when installing. In VS2015 several editions cannot coexist on the same machine.

    My portal and blog about VSX: http://www.visualstudioextensibility.com<br/> Twitter: https://twitter.com/VSExtensibility<br/> MZ-Tools productivity extension for Visual Studio: https://www.mztools.com

    Tuesday, February 21, 2017 8:12 AM
    Moderator
  • Thanks again Carlos, since I need to consult the Setup APIs for VS 2017, I can query it for the edition and map it to the /skuName argument, but for older versions of Visual Studio, seems like the lowest supported edition "Pro" for /skuName should do.


    Tuesday, February 21, 2017 8:19 AM
  • Yes, I have blogged about this:

    Using VSIXInstaller.exe to install programmatically an extension to Visual Studio 2015 and Visual Studio 2017
    http://www.visualstudioextensibility.com/2017/02/21/using-vsixinstaller-exe-to-install-programmatically-an-extension-to-visual-studio-2015-and-visual-studio-2017/


    My portal and blog about VSX: http://www.visualstudioextensibility.com<br/> Twitter: https://twitter.com/VSExtensibility<br/> MZ-Tools productivity extension for Visual Studio: https://www.mztools.com

    Tuesday, February 21, 2017 1:00 PM
    Moderator
  • Carlos, I have a follow up question, if you run the sample, the product ID is printed as "Microsoft.VisualStudio.Product.Professional". This has to map to the /skuName argument "Pro". You think we should just map these strings, or do you know of a better way?
    Friday, February 24, 2017 6:47 AM
  • I haven't found any GetXXX method of the VS instance or product that returns the "Pro" token, so you will need to map hardcoding.

    My portal and blog about VSX: http://www.visualstudioextensibility.com<br/> Twitter: https://twitter.com/VSExtensibility<br/> MZ-Tools productivity extension for Visual Studio: https://www.mztools.com

    Friday, February 24, 2017 11:16 AM
    Moderator
  • I installed VS 2017 Enterprise today and see a new /instanceIds argument with VSIXInstaller.exe

    Don't see it in the VSIXInstaller of Professional edition though.

    If I use the one with the new argument and provide the instance IDs returned by the Setup APIs (no /skuName and /skuVersion arguments), I see this:

    Monday, February 27, 2017 9:32 AM
  • I installed the latest of Professional, and I see the /instanceIds argument now. This serves better than the /skuName mapping for me.
    Monday, February 27, 2017 10:31 AM