In my project there is several modules. Source files for them are generated by heatdirectory.
<HeatDirectory DirectoryRefId="ServerAdminService" OutputFile="Source\ServerAdminServiceSource.wxs" Transforms="Filter.xsl" Directory="..\..\Server\ServerServiceManager\bin\Debug\" PreprocessorVariable="var.ServerAdminServicePath" ComponentGroupName="ServerAdminServiceGroup" ToolPath="$(WixToolPath)" SuppressCom="true" SuppressFragments="true" SuppressRegistry="true" SuppressRootDirectory="true" AutoGenerateGuids="true" GenerateGuidsNow="false">
</HeatDirectory>
<HeatDirectory DirectoryRefId="ServerAdminService" OutputFile="Source\ServerAdminClientSource.wxs" Transforms="Filter.xsl" Directory="..\Setup\C24.ServerAdmin.UI\bin\Debug\" PreprocessorVariable="var.ServerAdminClientPath" ComponentGroupName="ServerAdminClientGroup" ToolPath="$(WixToolPath)" SuppressCom="true" SuppressFragments="true" SuppressRegistry="true" SuppressRootDirectory="true" AutoGenerateGuids="true" GenerateGuidsNow="false">
</HeatDirectory>
It work fine. I need to install them in one directory. But they use several libraries, which presents in both modules, and after generating source files consist the component with duplicate ID. Actually i don't know what to do. Does somebody have an idea?
I had the exact same issue.
I had solved it by creating a custom build task to run after the HeatDirectory task to append a suffix to the Id attribute.
The AddSuffixToHeatDirectory task is as such
Hope that helps. I'm still using this method today and I've not done the legwork to look into a Transform or extending HeatDirectory instead.