我正在尝试通过Condition通过Wix 3.11检查.net版本。直到4.5都可以正常工作,如下所示:

<PropertyRef Id="NETFRAMEWORK45" />
  <Condition Message="This application requires .NET Framework 4.5. Please install the .NET Framework then run this installer again.">
    <![CDATA[Installed OR NETFRAMEWORK45]]>
  </Condition>

检查高于4.5的值似乎是不可能的-至少不能使用此机制。我怎样才能做到这一点?

最佳答案

该方法(PropertyRef)是语法糖。 NetFxExtension预处理器在编译时注入(inject)实现。 WiX目前落后。您正在寻找的实现将是这样的:

<PropertyRef Id="NETFRAMEWORK45" />
<Condition Message="This application requires .NET Framework 4.7.1. Please install the .NET Framework then run this installer again."><![CDATA[Installed OR NETFRAMEWORK45>=#461308]]>
</Condition>

https://github.com/wixtoolset/issues/issues/5575

更新(hot33331):在数字461308之前添加一个#。否则,它对我不起作用。

关于wix - 如何使用Wix 3.11检查.net Framework 4.7.1,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/49778581/

10-12 03:51