|
Welcome,
Guest
|
|
|
Reposting this question :
Is it possible to use the same merge module twice in the same source file. <Directory Id="TARGETDIR" Name="SourceDir"> <Directory Id="ProgramFilesFolder"> <Directory Id="MergeModuleSample" Name="Merge Module Sample"> <Directory Id="INSTALLDIR" Name="Merge Mod32"> <Directory Id="F1" Name="F1"/> <Directory Id="F2" Name="F2"/> </Directory> </Directory> </Directory> </Directory> <DirectoryRef Id="F1"> <Merge Id="merge1" Language="1033" DiskId="1" SourceFile="abc.msm"> </Merge> </DirectoryRef> <DirectoryRef Id="F2"> <Merge Id="merge2" Language="1033" DiskId="1" SourceFile="abc.msm"> </Merge> </DirectoryRef> <Feature Id="ProductFeature2" Title="MergeMod322" Level="1"> <MergeRef Id="merge1"/> </Feature> <Feature Id="ProductFeature1" Title="MergeMod321" Level="1"> <MergeRef Id="merge2"/> </Feature> The above code is giving error: Error 1 The merge module 'merge2' contains a file identifier, 'm', 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. Code in the merge module: <Directory Id="TARGETDIR" Name="SourceDir"> <Directory Id="Folder1"> <Component Id="Comp1" Guid=""> <File Id="m" Name="file1.txt" KeyPath="yes" Vital="no" Checksum="yes" Source="F:\file1.txt" /> </Component> </Directory> </Directory> Basically i want to copy the file (file1.txt) in F1 and F2 using the mereg module.How can it be done? |
|
|
|
You can't merge a Merge Module twice. You can connect the Merge Module to multiple Features but that won't get what you want. I think in your case, you'll have to use a CopyFile element to copy the decorated File/@Id from the Merge Module.
|
|
|
|
|
|





