WiX - assembly of non-project assemblies in the settings

I use WiX 3.5 in VS 2010, and I added all the project assemblies as references in the Setup project (.wixproj) and set the Harvest property to True so that binary files, content and satellites are included in the .msi file.

However, how can I add any third-party assemblies (.dlls) to the .msi output? Do I need to add them explicitly to the Product.wxs file, or is there a better way? Ideally, I would like to add them as links to files in the installation project, but this doesn't seem like an option?

+8
installation visual-studio-2010 wix
source share
2 answers

Yes, you will need to add them manually to some wxs file OR you can use the pre-build step, which uses heat to assemble this file for you (provided that all these files are in a separate directory).

Heat is part of Wix and can compile the entire catalog using a switch. Depending on the command line arguments, it creates a separate wxs file containing one ComponentGroup. Just specify this ComponentGroup from product.wxs.

An example of how I am currently using heat to collect my release directory:

heat dir "../../bin/release" -gg -cg CG.ApplicationBinaries -dr INSTALLDIR -scom -sfrag -sreg -srd -var var.BuildOutputDir -o ApplicationBinaries.wxs

This will lead to the creation of the ApplicationBinaries.wxs file:

<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"> <Fragment> <DirectoryRef Id="INSTALLDIR"> <Component Id="cmp53F90D1335DD67504EC2B9E1E8620DD3" Guid="{CA2DF1B5-7B20-4596-84A4-925B4F9BA6EC}"> <File Id="filC65F9CB88694FCA79FCB3CADB9481921" KeyPath="yes" Source="$(var.BuildOutputDir)\AsyncTCPsocket.dll" /> </Component> .... </DirectoryRef> </Fragment> <Fragment> <ComponentGroup Id="CG.ApplicationBinaries"> <ComponentRef Id="cmp53F90D1335DD67504EC2B9E1E8620DD3" /> ... </ComponentGroup> </Fragment> </Wix> 
+7
source share

There is currently a bug in Heat that is being used by the WiX installer project, which means that project assembly links are not automatically collected. You may have to wait for version 4 before it is processed.

At the same time, @Elmar de Koning's answer is likely to be the best at the moment.

+4
source share

All Articles