For those who don’t know it yet: you can use project references in your WiX installer project and use these inside the WXS files!
In the example below I’ve added a reference from the Setup project to the Program project.
Look at the lines 12 and 13 where I use project reference variables to point to the output location and the output file name:
The sweet thing about this is that it nicely integrates with TeamBuild! You don’t have to worry about the actual location of included items. Even resource files that are not part of the output can be referred to by using the solution directory variable. All available project reference variables can be found in the documentation.
The only problem I’ve discovered yet when referencing multiple projects with the same name…