Click here to Skip to main content
15,881,801 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I have 4 services merge modules... I have created a "Shared services merge module" that has 4 files that are required to be installed with each service (so I have 5 merge modules, 1 is shared between the other 4) The 4 services are installed to a unique directory i.e.:
C:\program files\company\product\services
Service1
Service2
Service3
Service4
and that shared merge module needs to install into each ServiceX directory...

I am running into problems trying to install that shared merge module here is some code:

XML
<Feature Id="Feature_1" Title="Main Feature" Description="This will installl the 1 Feature..." Level="1" Display="expand" ConfigurableDirectory="INSTALLFOLDER">
      <MergeRef Id="feature1mainmergemodule"/>
      <MergeRef Id="feature1mainmergemodule1"/>
      <MergeRef Id="FirstServicesMergeModule"/>
      <MergeRef Id="SecondtServicesMergeModule"/>
      <MergeRef Id="ThirdServicesMergeModule"/>
      <MergeRef Id="FourthServicesMergeModule"/>
      <MergeRef Id="SharedServicesMergeModule"/>
      </Feature>

          <Feature Id="Feature_2" Title="Main Feature" Description="This will installl the 2 Feature..." Level="1" Display="expand" ConfigurableDirectory="INSTALLFOLDER">
      <MergeRef Id="feature2mainmergemodule"/>
      <MergeRef Id="feature2mainmergemodule1"/>
      <MergeRef Id="FirstServicesMergeModule"/>
      <MergeRef Id="SecondtServicesMergeModule"/>
      <MergeRef Id="ThirdServicesMergeModule"/>
      <MergeRef Id="FourthServicesMergeModule"/>
      <MergeRef Id="SharedServicesMergeModule"/>
      </Feature>


I have a fragments for each service (so 4 in total for the services) so the SharedServicesMergeModule mrege module is referenced 4 times in each of the fragments, i.e.:


XML
      <Fragment>
  <Directory Id="TARGETDIR" Name="SourceDir">
    <Directory Id="ProgramFilesFolder">
      <Directory Id="ProgramFilesFolder.MyCompany" Name="Company">
        <Directory Id="ProgramFilesFolder.MyProduct" Name="Product">
          <Directory Id="ProgramFilesFolder.Services" Name="Services">
            <Directory Id="ProgramFilesFolder.ServiceName" Name="Service1">
              <Merge Id="FirstServicesMergeModule" DiskId="1" SourceFile="..\Services\FirstServicesMergeModule\bin\$(var.Configuration)\FirstServicesMergeModule.msm" Language="1033"/>
              <Merge Id="SharedServicesMergeModule" DiskId="1" SourceFile="..\Services\SharedServicesMergeModule\bin\$(var.Configuration)\SharedServicesMergeModule.msm" Language="1033"/>
            </Directory>
          </Directory>
        </Directory>
      </Directory>
    </Directory>
  </Directory>
</Fragment>

Secondservice, thirdservice, fourthservice...


However when I compile the setup product wix I get these errors:

Error 12  The merge module 'SharedServicesMergeModule' contains a file identifier, 'File_ServiceAssembly.2FC299CF_7F63_460C_B60D_8F7C3FF8C3C7', that is duplicated either in another merge module or in a File/@Id attribute.  File identifiers must be unique.  Please change one of the file identifiers to a different value.  C:\Dev\Setup\Product.wxs    107 1   Setup


So my question is... How can a share 1 merge module with the four services merge module?

thanks,

Steve
Posted
Updated 31-Aug-12 8:55am
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900