I'm working on a .NET profiler and I need to build 2 DLLs for 64bit machines (one for x86 compatible applications and the other for x64 ones). I want to create a single MSI that contains the 2 DLLs. Is this possible?
Yes, you can create a single MSI to install the files. However, MSI packages are either 32-bit or 64-bit. A 64-bit MSI package cannot install on a 32-bit machine and a 32-bit package cannot install to 64-bit locations. So, if you are okay with your 64-bit binaries being installed to 32-bit locations (like C:\Program Files (x86)\) then you can just add Conditions to your Components to get the right bits installed.
For example using the WiX toolset the code could look like:
<Component>
<Condition>NOT VersionNT64</Condition>
<File Source='path\to\32bit.dll' />
<Compnent>
<Component>
<Condition>VersionNT64</Condition>
<File Source='path\to\64bit.dll' />
<Compnent>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With