Using very simple code almost same as in examples:
<?xml version="1.0" encoding="utf-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Bundle Version="1.0" Manufacturer="ACME" UpgradeCode="6AF8AF7D-3B44-4496-9E64-56206DF66C55">
<BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.RtfLicense"/>
<Chain>
<MsiPackage SourceFile="wpftoolkit.msi"/>
</Chain>
</Bundle>
</Wix>
I get a setup.msi file that produced error imidiatly in start:
msiexec /i setup.msi /l*v log.txt
log.txt:
=== Verbose logging started: 02.10.2013 14:12:11 Build type: SHIP UNICODE 5.00.7600.00 Calling process: C:\Windows\system32\msiexec.exe ===
MSI (c) (B0:48) [14:12:11:804]: Font created. Charset: Req=204, Ret=204, Font: Req=MS Shell Dlg, Ret=MS Shell Dlg
MSI (c) (B0:48) [14:12:11:805]: Font created. Charset: Req=204, Ret=204, Font: Req=MS Shell Dlg, Ret=MS Shell Dlg
MSI (c) (B0:A4) [14:12:11:823]: Resetting cached policy values
MSI (c) (B0:A4) [14:12:11:823]: Machine policy value 'Debug' is 0
MSI (c) (B0:A4) [14:12:11:823]: ******* RunEngine:
******* Product: Setup.msi
******* Action:
******* CommandLine: **********
MSI (c) (B0:A4) [14:12:11:824]: Note: 1: 2203 2: Setup.msi 3: -2147286960
MSI (c) (B0:A4) [14:12:11:824]: MainEngineThread is returning 1620
=== Verbose logging stopped: 02.10.2013 14:12:11 ===
Tool dark.exe from Wix SDK says that setup.msi is corrupt and cannot be disassembled. Several times last week I managed to compile this type of bundle and msi worked well, but I can't figure out any corellation between what I was doing.
I've also tried to compile this example without using MSBuild, but directly with Wix SDK tools - still no luck - compilation finishes without errors, but resulting msi is corrupt anyway:
candle *.wxs
light *.wixobj -out setup.msi -ext WixBalExtension
Is there something I've missed about compiling Wix bundles that prevents it from working right way?
A
Wix/Bundle
is used to produce an executable that chains installers together. Therefore, the output should be given an .exe extension.You can invoke the WiX Toolset compiler and linker manually as you appear to have done or use an MSBuild project. WiX installs a template project for Visual Studio to use. It's called WiX Bootstrapper. If you didn't know, Visual Studio and SharpDevelop projects are MSBuild projects. So, there are two more ways to build a build: Via the IDE or on the commandline with msbuild.exe.
Note: Visual Studio won't show the four WiX project templates if you install WiX before Visual Studio. In that case, simply Repair the WiX installation.
It is absolutely counterintuitive, but I think I've found a solution:
The output format is EXE, not MSI. Simple, right?
BTW, SharpDevelop (as well as Visual Studio, I believe) doesn't have any option to specify the output file as EXE - only MSI, msp and wixlib.