How to check for .net framework 4.7.1 with Wix 3.11

|▌冷眼眸甩不掉的悲伤 提交于 2020-01-22 14:59:13

问题


I am trying to check for .net Version with Wix 3.11 via Condition. This works fine until 4.5 like this:

<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>

Checking for anything above 4.5 seems not to be possible - at least not with this mechanism. How can I do that?


回答1:


That method (PropertyRef) is syntactical sugar. The NetFxExtension preprocessor injects the implementation at compile time. WiX is currently lagging behind. The implementation you are looking for would be something like:

<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

Update (hot33331): Added a # before the number 461308. Without that it did not work for me.



来源:https://stackoverflow.com/questions/49778581/how-to-check-for-net-framework-4-7-1-with-wix-3-11

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!