I'm trying to create an MSI for my project using WIX. I've got HEAT pointing to the correct directory and the file it spits out is correct, but for some reason when I actually run MSBuild on it it's also giving me all of my unit test dll files.
Anyone have any idea how to remove those from the build process?
One option would be to write an XSL transformation modifying the generated HEAT output (e.g. removing the unwanted files):
To remove a specific file your xsl could be something like:
This approach allows you to make other changes to the file as well. Though to only remove unwanted files it's usually simpler to just delete them from the build directory or to move the desired files into another directory and run HEAT there.
Typically you wouldn't point heat.exe at your default build directory for just this reason. After you compile your product's binaries add a second step to stage the files you want into a second directory. Then, point heat.exe at the staged directory. That way you have more control over the files & paths that get harvested.