本文介绍了Windowsinstaller中的Autogen Guid(*)导致ICE08错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的wxs文件中的两个组件标签如下所述

Two component tags in my wxs file is as folllows

<Component Id="Comp.Comp1" Guid="*" >
<Condition><![CDATA[VersionNT < 602]]></Condition>
<File Id="File1" Source="$(Dir1)\TestFile.dll" />
 </Component>

<Component Id="Comp.Comp2" Guid="*" >
<Condition><![CDATA[VersionNT >= 602]]></Condition>
<File Id="File2" Source="$(Dir2)\TestFile.dll" />
 </Component>

但是iam出现如下错误

But iam getting an error as below

ICE08: Component: Comp.Comp2 has a duplicate GUID: {2963D8E7-CBEC-50C8-AF4B-65E895FE3283}   

即使我给出了autogen引导值 *,我也如何得到此错误

How iam getting this error eventhough i gave an autogen guid value "*"

谢谢,

推荐答案

Component 元素的星型GUID根据目标的目标位置计算出稳定的GUID。文件。 GUID的稳定性对于将来的更新(尤其是修补)至关重要。它在许多情况下都很好用,但是将文件放到完全相同位置的互斥组件不是一个。在这种情况下,您需要显式设置至少一个 Component / @ Guid s。

The star-GUID for Component elements calculates a stable GUID based on the target location of the file. The stability of the GUID is vital for future updates (particularly patching). It works great in many cases but mutually exclusive Components that put a file into the exact same location is not one. In this case, you'll need to explicitly set at least one of your Component/@Guids.

在上述情况下,您可以执行以下操作:

In the above case, you can do the following:

<Component Id="Comp.Comp1" Guid="*" >
    <Condition><![CDATA[VersionNT < 602]]></Condition>

    <File Id="File1" Source="$(Dir1)\TestFile.dll" />
</Component>

<Component Id="Comp.Comp2" Guid="PUT-GUID-HERE">
    <Condition><![CDATA[VersionNT >= 602]]></Condition>

    <File Id="File2" Source="$(Dir2)\TestFile.dll" />
</Component>

从技术上讲,在这种情况下,您可以抑制ICE08错误,因为组件是互斥的,但我个人,将在抑制ICE之前执行上述操作。恕我直言,最好还是让不同的文件最终都具有不同的GUID。

Technically speaking you could suppress the ICE08 error in this case because the Components are mutually exclusive but I, personally, would do the above before suppressing the ICE. IMHO, it is preferable that the different files have different GUIDs ultimately anyway.

这篇关于Windowsinstaller中的Autogen Guid(*)导致ICE08错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-31 00:15