【问题标题】:"MsiNTProductType", "POWERSHELLVERSION" in WIX 3.6WIX 3.6 中的“MsiNTProductType”、“POWERSHELLVERSION”
【发布时间】:2014-05-07 21:38:02
【问题描述】:

在我的 WIX 项目中,我想使用被引属性。 以下被引属性运行良好

<PropertyRef Id="NETFRAMEWORK45"/>
    <Condition Message="You must install .Net Framework 4.5">
      <![CDATA[Installed OR NETFRAMEWORK45]]>
    </Condition>
<PropertyRef Id="VersionNT64"/>
    <Condition Message="This application cannot be running on 32 bit architechure">
      <![CDATA[Installed OR VersionNT64]]>
    </Condition>

但其他属性使用我的调试提交以下消息:

“错误 1 ​​未解决对‘Product:*’部分中符号‘Property:MsiNTProductType’的引用” 例如:

顺便说一句,WixNetFxExtension 存在。

【问题讨论】:

  • 我不知道您为什么发布了一个有效的属性示例,但您没有发布引用 MsiNTProductType 的实际失败内容。

标签: wix windows-installer


【解决方案1】:

MsiNTProductType 是一个有效的内置 Windows Installer 属性,因此如果您在 WIX 代码中没有任何拼写错误,这应该可以正常工作。正如 Phil 所问,请使用引用 MsNTProductType 属性的实际 Wix 代码更新您的问题。

根据我的经验,很容易在 Wix 源文件中混淆一些琐碎的内容,并且错误很可能只是一个额外的逗号、点或其他一些琐碎的错字。我将只包含指向MSI Property Reference 的链接。

【讨论】:

    【解决方案2】:

    这是我的属性部分。 唯一有效的是“NETFRAMEWORK45”。 其余的人在评论中,因为他们引用了我提到的错误。 我必须明白为什么会发生错误。 谢谢, 滴滴

        <PropertyRef Id="NETFRAMEWORK45"/>
        <Condition Message="You must install .Net Framework 4.5">
          <![CDATA[Installed OR NETFRAMEWORK45]]>
        </Condition>
    
        <!--
        <PropertyRef Id="POWERSHELLVERSION"/>
        <Condition Message="You must install Powershell ver 3.0">
          <![CDATA[Installed OR POWERSHELLVERSION >= "3.0"]]>
        </Condition>
    
    
        <PropertyRef Id="VersionNT64"/>
        <Condition Message="This application cannot be running on 32 bit architechure">
          <![CDATA[Installed OR VersionNT64]]>
        </Condition>
    
        <PropertyRef Id ="VersionNT"/>
        <Condition Message="Operating system must be Windows Server 2008 or higher">
          <![CDATA[VersionNT >= 600]]>
        </Condition>
    
        <PropertyRef Id ="MsiNTProductType"/>
        <Condition Message="Operating system must be SERVER O.S">
          <![CDATA[MsiNTProductType <> 3]]>
        </Condition>
        -->
    

    【讨论】:

      【解决方案3】:

      MsiNTProductType 是标准的 Windows Installer 属性 - 您正在尝试重新定义它并遇到该错误。标准属性所需要的只是条件 - 删除 MsNTProductType、VersionNT、VersionNT64 的 PropertyRef。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 2012-09-05
        • 2013-09-08
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多