Updating VSPackages


  • Hi,

    I have been developing VS extensions that target VS 2012, 2013, 2015 and 2017. Until recently, there was a separate package for each VS version.

    I am trying to consolidate in one single VS package that will target all 4 VS versions. 

    The problem is how to remove the old extension when installing this new one, as they have different GUIDs?

    So let's say I'm developing in VS 2017 and keeping the old VS 2017 package GUID, but how will I recognize the old ones and remove them or at least inform the user of this duplication?

    Kind regards,

    Friday, February 09, 2018 4:21 PM

All replies

  • I would create an entirely new guid for your "multi target package" and in its Initialize() method you can search if any of the old extensions are installed, and tell the user about it (or even Schedule an uninstall of those extensions for the user).

    I use the Initialize() method for a lot of additional installation and setup tasks, like copying public dlls to assembly folders and updating them if necessary, creating Registry keys etc.

    Friday, February 09, 2018 4:45 PM
  • Otherwise I would say you need to leave the VSIX Installer and use a Setup Project instead, like WIX Toolset, where you can do a lot more advanced install/setup scripts. VSIX Installer is pretty basic.
    • Proposed as answer by chgerdes Monday, February 19, 2018 7:51 PM
    Friday, February 09, 2018 4:47 PM
  • Thank you for your reply.

    I think I will have to go with your second solution.

    Monday, February 12, 2018 11:52 AM