如何在Wix中管理同名文件? [英] How to manage files with same name in Wix?
问题描述
我在 .Net3.5 或 .Net4.0 中编译了一些 dll.(他们有相同的名字)
在 wix 中,我有 2 个条件功能.
功能 A 使用 ComponentRef Id="Cmp35"
安装我的应用程序的 .net3.5 dll功能 B 使用 ComponentRef Id="Cmp40"
安装 .net4.0 dll功能是互斥的,只安装一个功能.
I have some dll compiled either in .Net3.5 or in .Net4.0. (They have the same name)
In wix, I have 2 conditionals features.
Feature A installs .net3.5 dll of my app with ComponentRef Id="Cmp35"
Feature B installs .net4.0 dll with ComponentRef Id="Cmp40"
Features are mutually exclusives, only one feature is installed.
我的组件:
<?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:目标文件 ... 安装在 ... LFN 系统上的两个不同组件中:
看来我有问题,因为文件名相同...
有没有办法管理这个?谢谢!
I have an error during the compilation:
error LGHT0204: ICE30: The target file ... is installed in ... by two different components on an LFN system:
It seems I have an issue because the filenames are the same...
Is there a way to manage this? thanks!
推荐答案
那些只是来自 ICE30 的警告.如果您确认这些组件确实是互斥的,那么您可以忽略警告,因为您已按照他们的指示做了.:)
Those are just warnings from ICE30. If you verified that the Components are truly mutually exclusive then you can ignore the warnings because you did what they told you to. :)
这篇关于如何在Wix中管理同名文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!