This article aims to bestow some knowledge on how to generate an .msi package using Wix toolset from command line, and hence also aims to perform a noble cause of saving some eyes from getting strained and some hair falling off of the scalp
While an effort to build a “Continuous Delivery Using Build Pipelines With Jenkins ”, we came across a hurdle of how to generate a .msi package using wix from command line. And it took real hard work of couple of days to get the solution. Mostly the credit for toiling so hard goes to unconsolidated information scattered at far of places on the web. Hence this article aims to provide a single point of source of wisdom for tackling this problematic beast. Ok Enough babbling! Let us get to work.
Step 1: Build the solution from command line to generate bin/Debug output:
heat.exe dir : followed by Target folder, in my case bin\Debug folder after a successful build of my solution.
-dr INSTALLFOLDER : Makes sure the generated .wxs file has Directory=”INSTALLFOLDER” tag.
-cg : The component group name you want to give.
A new fragment file will be created at location ..\Setup
In our scenario, we had a pre-written Product.wxs file, which is used along with generated fragment.wxs file to give Product.wixobj and fragment.wixobj files.
And finally we use light.exe to generate .msi setup, targeting our step 4 generated wixobj files and our bin\Debug folder.
Hope you find this article helpful!