tags:

views:

14

answers:

1

I have a component that needs to be installed if another feature ( not the parent feature of the component) is being installed.

The component conditions seems to be evaulated during CostFinalize action, so i created a property and set the value of that property, I then force CostInitialize action using a custom action

but the component still doesnt get installed, any clues ?

A: 

Component conditions are only evaluated for components that belong to features that are being installed. They can only exclude the component not include the component.

Install you must make the component belong to the other feature by using a ComponentRef element. Components are allowed to be associated with more then one feature.

<Directory....>
  <Component Id="test1"...>
  <Component Id="test2"...>
  <Component Id="testcommon"...>
</Directory>

<Feature Id="A"...>
  <ComponentRef Id="test1"/>
  <ComponentRef Id="testcommon"/>
</Feature>
<Feature Id="B"...>
  <ComponentRef Id="test2".../>
  <ComponentRef Id="testcommon".../>
</Feature>
Christopher Painter
thats the problem, I am trying to install a component in feature A only if Feature B is selected by user, anyway to accomplish this ?
What do you want to happen if Feature B is being installed but not Feature A?
Christopher Painter