Reputation: 281
I'm trying to install a feature if the condition is true.
According to tutorials it should work like this:
<Feature Id='ParentFeature' Id='Default'
Title='Wix Sample App'
Description='The complete package of Wix Sample App.'
Display='expand'
Level='1'
ConfigurableDirectory='INSTALLDIR'>
<Feature Id='ChildFeature' Title='AppConfig Internal' Level='1'>
<ComponentRef Id='MyApp.exe' />
</Feature>
<!-- This is the conditional feature -->
<Feature Id='OptionalChildFeature' Title='AppConfig Internal' Level='0'>
<ComponentRef Id='MyApp.exe.config' />
<Condition Level='1'><![CDATA[TRUE]]></Condition>
</Feature>
</Feature>
My example results in NOT getting the optional feature installed, but I expected it to get installed.
The resources I used:
Update:
I tried to make a prototype with which didn't work. finally worked and I could identify the problem in previous steps (a property was not correctly set).
Upvotes: 0
Views: 140
Reputation: 55601
You're condition of "TRUE" doesn't make sense. TRUE would be a public property called TRUE. Presumably, nothing set it to have a value so the condition evaluates to false and hence the feature remains at InstallLevel 0 and isn't installed.
Upvotes: 1