I had a similar issue when i tried to create a .msi installation of my solution.
To overcome this problem and to make it long lasting over time even when I insert new .dll and other dependencies to my project and to make it automatic I did the following.
In my Product.wxs I have this "Directory"
<!--Here We Install Our Main App-->
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFilesFolder">
<Directory Id="INSTALLFOLDER" Name="MyAppDir"/>
</Directory>
...
</Directory>
and in my Wix project-> properties -> Build events -> Pre build event command line, I added this command:
"%wix%\bin\heat" dir "$(SolutionDir)MainProject\bin\Debug" -dr INSTALLFOLDER -scom -frag -srd -sreg -gg -cg Components -var var.MainProject.TargetDir -o $(SolutionDir)MainProject\Includedheat.wxs
Once I build my wix project it will create a Includedheat.wxs file in my MainProject directory that lists all the files from my MainProject\bin\Debug directory.
Next step - add the Includedheat.wxs into the wix project , than in my feature section I added:
<!--Add Component-->
<Feature Id="MainApplication" Title="Main Application" Level="1">
...
<ComponentGroupRef Id="Components" />
</Feature>
now once I rebuild and install the .msi all of the content that resided in my MainProject\bin\Debug directory will also be included in the MyAppDir dir on the target location.
For some more information:
I followed this guides :
Create a working Wix project.
Easy way heat.exe.
Also recomending to read for detrming what flags to use in your command.