5

我在.Net3.5 或.Net4.0 中编译了一些dll。(它们具有相同的名称)
在 wix 中,我有 2 个条件功能。
功能 A 使用 ComponentRef Id="Cmp35" 安装我的应用程序的 .net3.5 dll
功能 B 使用 ComponentRef Id="Cmp40" 安装 .net4.0 dll
功能是互斥的,只安装了一个功能。

我的组件:

<?xml version="1.0" encoding="UTF-8"?>  
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">  
    <Fragment>  
        <DirectoryRef Id="INSTALLDIR">  
            <Component Id="Cmp35" Guid="..">  
                <File Id="Behaviors.Assembly" Name="$(var.Behaviors.v3.5.gen.TargetFileName)" Source="$(var.Behaviors.v3.5.gen.TargetPath)" />  
               <File Id="Other.Assembly" Name="$(var.Other.v3.5.gen.TargetFileName)" Source="$(var.Other.v3.5.gen.TargetPath)" />  
           </Component>  
           <Component Id="Cmp40" Guid="...">  
               <File Id="Behaviors.Assembly.4.0" Name="$(var.Behaviors.v4.0.gen.TargetFileName)" Source="$(var.Behaviors.v4.0.gen.TargetPath)" />  
               <File Id="Other.Assembly.4.0" Name="$(var.Other.v4.0.gen.TargetFileName)" Source="$(var.Other.v4.0.gen.TargetPath)" />  
           </Component>  
       </DirectoryRef>  
    </Fragment>  
</Wix>

我在编译过程中出现错误:错误 LGHT0204: ICE30: The target file ... is installed in ... by an LFN system 上的两个不同组件:
似乎我有一个问题,因为文件名相同
......有办法管理这个吗?谢谢!

4

2 回答 2

8

这些只是来自 ICE30 的警告。如果您验证了组件确实是互斥的,那么您可以忽略警告,因为您按照他们的指示做了。:)

于 2013-03-20T17:27:41.283 回答
5

我通常通过将文件安装到不同的子目录然后使用 CopyFile 元素(DuplicateFile 表)将文件克隆到所需目录来绕过 ICE30 警告。当您的功能或组件相互排斥并且您希望 ICE 保持安静时,这很有效。

于 2013-03-20T16:50:23.287 回答