本文介绍了WIX:是否可以多次使用合并模块?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我有4个服务合并模块...我创建了一个共享服务合并模块",其中每个服务都需要安装4个文件(所以我有5个合并模块,其他4个之间共享1个)4服务安装到唯一目录,即:
C:\ program files \ company \ product \ services
服务1
Service2
服务3
服务4
并且该共享合并模块需要安装到每个ServiceX目录中...

我在尝试安装共享合并模块时遇到问题,这是一些代码:

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:

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



我为每个服务都有一个片段(因此服务总共有4个片段),因此在每个片段中对SharedServicesMergeModule mrege模块都引用了4次,即:




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


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



但是,当我编译安装产品wix时,出现以下错误:



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



所以我的问题是...如何将共享1合并模块与四个服务合并模块?

谢谢,

Steve



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

thanks,

Steve

推荐答案




但是,当我编译安装产品wix时,出现以下错误:



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



所以我的问题是...如何将共享1合并模块与四个服务合并模块?

谢谢,

史蒂夫



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

thanks,

Steve


这篇关于WIX:是否可以多次使用合并模块?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-31 05:47