[wix-devs] RFC: support VS 2019 #5923

Christopher Painter chrpai at iswix.com
Sun Dec 16 16:51:03 PST 2018


I took a look at getting VS2019 support in the VsExt as I need this to update my IsWiX installer to register itself with VS2019.  I was able to get a working solution.  I present it for your consideration but imagine there might be better ways to do this and you might want to wait longer  before taking it.


The concept is simple.  Working of a fork of  the wix3 develop branch (3.14 is on my radar.. 4.x and the new repos wasn't really looked at but I imagine this patch can easily be applied there also )    I made the following changes:

src/ext/VSExtension/wixlib
Clone VS2017 -> VS2019.wxs  and replace all occurrences of 17 with 19

Update VSExtension.wixproj  and add VS2019.wxs to the list of files to compile


src/ext/VSExtension/ca

Update vsca.cpp

-- clone the ProcessVS2017 function to ProcessVS2019 and update all 17 occurrences to 19

-- update vrgInstances and add a new FILEMAKEVERSION element referencing 16 and ProcessVS2019


Actual changes can be found here: https://github.com/chrpai/wix3/tree/vsext/src/ext/VSExtension



I build a private build of wix3.14  with this code and used it to build a new IsWiX.msi using the new 2019 property and custom action elements.  Everything built and installed on a clean VM as expected.    IsWiX now works on 2019.


I also created a dummy MSI  and added every single PropertyRef  to it.  They all had values in the resulting installer log file.


My biggest problem with this is the ProcessVS2019  function isn't dry.   Some refactoring might be needed to create a common ProcessVS  method passing in data to make it more DRY.   This is way beyond my C/C++ capabilities so someone else would need to do this.   I just followed the existing code patterns and copy/pasted/transformed everything  nice and simple and it worked first try.


Comments?



More information about the wix-devs mailing list