加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > Windows > 正文

如何在WiX中检查.NET framework 4.5 prerequestics

发布时间:2020-12-13 20:56:39 所属栏目:Windows 来源:网络整理
导读:我想验证.NET Framework 4.0和4.5应该在安装之前安装在服务器上。因此,我使用了以下代码段,但是我不知道4.5的验证,没有列在链接 Reference中 PropertyRef Id="NETFRAMEWORK40FULL"/ Condition Message='This setup requires Microsoft .NET Framework 4.0
我想验证.NET Framework 4.0和4.5应该在安装之前安装在服务器上。因此,我使用了以下代码段,但是我不知道4.5的验证,没有列在链接 Reference中
<PropertyRef Id="NETFRAMEWORK40FULL"/>
    <Condition Message='This setup requires Microsoft .NET Framework 4.0 Full package or greater needs to be installed for this installation to continue.'>
      <![CDATA[Installed OR NETFRAMEWORK40FULL]]>
    </Condition>
NETFRAMEWORK45属性可以与NETFRAMEWORK40FULL相同。请注意,.NET Framework v4.5没有“客户端”或“完整”框架。只有一个。所以下面的代码应该做你想要的:
<PropertyRef Id="NETFRAMEWORK40FULL"/>
<PropertyRef Id="NETFRAMEWORK45"/>

<Condition Message='This setup requires Microsoft .NET Framework 4.0 Full package or greater needs to be installed for this installation to continue.'>
  <![CDATA[Installed OR NETFRAMEWORK40FULL]]>
</Condition>
<Condition Message='This setup requires Microsoft .NET Framework 4.5 package or greater needs to be installed for this installation to continue.'>
  <![CDATA[Installed OR NETFRAMEWORK45]]>
</Condition>

请注意,.NET Framework v4.5是.NET Framework 4.0的就地升级,因此检查两者都可能会导致您无法满足这两种情况。您可能只想检查是否已安装.NET Framework v4.0或.NET Framework v4.5。这种情况看起来更像:

<Condition Message='This setup requires Microsoft .NET Framework 4.0 Full or 4.5 package or greater needs to be installed for this installation to continue.'>
  <![CDATA[Installed OR NETFRAMEWORK40FULL OR NETFRAMEWORK45]]>
</Condition>

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读