Inside my main .wxs, I have components like:
<Component Id="Component1" Guid="FBE06968-502C-4FFB-82F8-A314AD7D5789" Directory="INSTALLFOLDER">
<Condition>$(var.CheckBoxB3)=1</Condition>
<File Name="File.dll" Source="$(var.BinDir)File.dll" />
</Component>
And it's working fine. The file is installed with a checkbox is checked.
I decide to add all files from a specific directory using heat.exe.
1 - I added the generated .wxs file in my project
2 - I added the good id inside the Directory elements
3 - I added a new feature inside the same feature containing my elements, here it's my new feature:
<Feature Id="ProductFeatureExamples" Title="Examples" Level="1">
<Condition Level="1">$(var.CheckBoxB3)=1</Condition>
<ComponentGroupRef Id="ExamplesComponents"/>
</Feature>
The good part: All the files inside the generated .wxs are installed.
The bad part: The condition is not working. The files are always installed.
I try to understand why my condition is not working? It's the same condition as the one in the previous components.
I dont want to add condition in all element in the generated .wxs file because there is a lot of them and also it's not very usefull when I need to regenerate the file.
Anyone have an idea?
Thanks.