我正在尝试通过条件检查 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 预处理器在编译时注入实现。 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 https://github.com/wixtoolset/issues/issues/5575
更新(hot33331):在数字 461308 之前添加了一个 #。没有它,它对我不起作用。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)