The WiX docs on the topic (Integrating WiX Projects Into Daily Builds) give a good starting point, but are incomplete, at least for the recent builds. Two additional things they forget to mention: WixToolPath needs to be an absolute path for the Wix.targets project to function properly, and WixExtDir needs to be set to WixToolPath.
To build WiX from the binaries with MSBuild, do the following (requires MSBuild 4):
- Snag the binaries from the latest weekly build: WiX Weekly Releases
- Extract them into a folder you can access with a relative path inside your source control root
- Edit all of your .wixproj files and do the following snippet before the <Import Project="$(WixTargetsPath)" > tag:
<WixToolPath>$([System.IO.Path]::GetFullPath('RELATIVEPATHTOWIX\wix\'))</WixToolPath> <WixTargetsPath>$(WixToolPath)Wix.targets</WixTargetsPath> <WixTasksPath>$(WixToolPath)wixtasks.dll</WixTasksPath> <WixExtDir>$(WixToolPath)</WixExtDir> </PropertyGroup>
- Update the RELATIVEPATHTOWIX to be a relative path that points to the WiX binaries you extracted in step 2.