I had a similar problem when I tried to create a .msi installation of my solution.
To overcome this problem and make it durable over time, even when I insert new .dlls and other dependencies into my project and automatically do this, I did the following.
In my Product.wxs I have this "Reference"
<Directory Id="TARGETDIR" Name="SourceDir"> <Directory Id="ProgramFilesFolder"> <Directory Id="INSTALLFOLDER" Name="MyAppDir"/> </Directory> ... </Directory>
and in my project project Wix-> properties β Build events β Pre build event, 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 the wix project, it will create the Includedheat.wxs file in my MainProject directory, which lists all the files from my MainProject \ bin \ Debug directory.
The next step is to add includeheat.wxs in your wix project than in my function section, which I added:
<Feature Id="MainApplication" Title="Main Application" Level="1"> ... <ComponentGroupRef Id="Components" /> </Feature>
now when i rebuild and install .msi, all the content that is in my MainProject \ bin \ Debug directory will also be included in the MyAppDir directory at the destination location.
For more information: I followed these guides:
Create a Wix work project.
The easy way is heat.exe.
It is also recommended that you read to determine what flags to use in your team.
Ravid goldenberg
source share