光抱怨一个目录名正在使用MSI的公共属性

问题描述:

我在我的WiX安装有第三方库,当我运行Light.exe这是造成以下错误:光抱怨一个目录名正在使用MSI的公共属性

错误LGHT0204:ICE99 :目录名称:Time与MSI公共属性中的一个相同,并且可能导致无法预料的副作用。

我对压制ICE错误,重命名目录和修改第三方接缝并不是很舒服,就像一个坏主意。还有其他的选择吗?

编辑:

解决

万一别人是有similiar的问题,这是我结束了使用(我是从这个博客:http://installpac.wordpress.com/2012/05/07/conflict-management-in-wix/):在xsl

<?xml version="1.0" ?> 
<xsl:transform version="1.0" 
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
    xmlns:wix="http://schemas.microsoft.com/wix/2006/wi"> 

    <xsl:template match="@*|*"> 
    <xsl:copy> 
     <xsl:apply-templates select="@*" /> 
     <xsl:apply-templates select="*" /> 
    </xsl:copy> 
    </xsl:template> 

    <xsl:template match="wix:Directory"> 
    <xsl:copy> 
     <xsl:apply-templates select="@*" /> 
     <xsl:attribute name="Id"> 
      <xsl:text>NameOfAThirdPartyLibraryImUsing_directory_</xsl:text> 
      <xsl:value-of select="@Id"/> 
     </xsl:attribute> 
     <xsl:apply-templates select="node()"/> 
    </xsl:copy> 
    </xsl:template> 
</xsl:transform> 

只有Id属性不应与MSI公共属性相同。这是它所抱怨的。

而不是

<Directory Id="Time"> 

写这

<Directory Id="Dir_Time" Name="Time"> 

其结果是,在适当命名的文件夹将被创建,并Id属性的值不会与MSI的公共属性冲突。你可以看看this thread,它突出了类似的问题。

+0

啊,谢谢!我正在使用热量,所以我没有手动命名目录。猜猜我只需要弄清楚如何重命名它。 – Mohrn 2014-10-30 16:39:32

+0

heat.exe通过'-t'开关接受XSL转换,这可以简单得多,就是用'Id'属性前缀 – 2014-10-30 20:22:45

+0

非常感谢! – Mohrn 2014-11-03 10:24:04