Click here to Skip to main content
11,921,353 members (63,820 online)
Rate this:
Please Sign up or sign in to vote.
See more: Modules

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
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:

<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 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"/>

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.:

  <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"/>
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?


Posted 31-Aug-12 5:29am
Edited 31-Aug-12 9:55am

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

  Print Answers RSS
0 OriginalGriff 553
1 Dave Kreskowiak 245
2 phil.o 160
3 KrunalRohit 134
4 Sergey Alexandrovich Kryukov 132
0 OriginalGriff 6,951
1 KrunalRohit 4,530
2 Sergey Alexandrovich Kryukov 3,171
3 George Jonsson 2,840
4 Suvendu Shekhar Giri 2,181

Advertise | Privacy | Mobile
Web04 | 2.8.151120.1 | Last Updated 31 Aug 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100