ComponentGroup element
The ComponentGroup
element can be used to group Component
elements, which is helpful as it offers a way to reference all of your components with a single element. For example, when adding components to a Feature
(which you must always do), you could use ComponentRef
elements directly. This is the technique we used in the previous chapter.
<Feature Id="ProductFeature" Title="Main Product" Level="1"> <ComponentRef Id="CMP_MyProgramEXE" /> <ComponentRef Id="CMP_AnotherFileDLL" /> </Feature>
However, by creating a ComponentGroup
, you can reference multiple components with a single ComponentGroupRef
element. This is shown in the snippet:
<Feature Id="ProductFeature"
Title="Main Product"
Level="1">
<ComponentGroupRef Id="MyComponentGroup" />
</Feature>
To create a ComponentGroup
, add a new CompontGroup
element to your .wxs
file. It can go anywhere inside the Product
element. Then, you have a...