Hi,

here is a small sample which defines a ComponentGroup and uses this group
in two features:

-------------------------------------------
<?xml version="1.0"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi";>
  <Product Id="12345678-1234-1234-1234-123456789012" Name="Test Package"
Language="1033"
           Version="1.0.0.0" Manufacturer="Microsoft Corporation">
    <Package Description="My second Windows Installer package"
             Comments="This is my first ..."
             InstallerVersion="200" Compressed="yes" />

    <Media Id="1" Cabinet="product.cab" EmbedCab="yes" />

    <ComponentGroup Id="MyCompGroup">
      <Component Id="MyComponent1"
Guid="12345678-1234-1234-1234-123456789012"
Directory="ProgramFilesFolder">
        <File Id="readme" Name="readme.txt" DiskId="1"
Source="readme.txt" />
      </Component>
      <Component Id="MyComponent2"
Guid="22345678-1234-1234-1234-123456789012"
Directory="ProgramFilesFolder">
        <File Id="readme2" Name="readme2.txt" DiskId="1"
Source="readme2.txt" />
      </Component>
    </ComponentGroup>

    <Directory Id="TARGETDIR" Name="SourceDir">
      <Directory Id="ProgramFilesFolder" Name="PFiles" />
    </Directory>

    <Feature Id="MyFeature1" Title="My 1st Feature" Level="1">
      <ComponentGroupRef Id="MyCompGroup" />
    </Feature>
    <Feature Id="MyFeature2" Title="My 2nd Feature" Level="1">
      <ComponentGroupRef Id="MyCompGroup" />
    </Feature>

  </Product>
</Wix>
-------------------------------------------

When compiling and linking Light shows following errors:

product.wixobj : error LGHT0095 : Multiple primary references were found
for Component 'MyComponent1' in Feature 'MyFeature1' and Feature
'MyFeature2'.
product.wixobj : error LGHT0095 : Multiple primary references were found
for Component 'MyComponent2' in Feature 'MyFeature1' and Feature
'MyFeature2'.

When setting the attribute Primary of the ComponentGroupRef to any value,
Light creates the same errors. Everything works fine, when I direct
reference the components:

-------------------------------------------
    <Feature Id="MyFeature1" Title="My 1st Feature" Level="1">
      <ComponentRef Id="MyComponent1" />
      <ComponentRef Id="MyComponent2" />
    </Feature>
    <Feature Id="MyFeature2" Title="My 2nd Feature" Level="1">
      <ComponentRef Id="MyComponent1" />
      <ComponentRef Id="MyComponent2" />
    </Feature>
-------------------------------------------

Has someone an idea what's going wrong here?

Thanks for your support!
Marcus


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to