gpt4 book ai didi

wix - 如何在WiX中检查.NET Framework 4.5预要求

转载 作者:行者123 更新时间:2023-12-03 13:17:07 25 4
gpt4 key购买 nike

我想确认在继续安装之前应在服务器上同时安装.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>

关于wix - 如何在WiX中检查.NET Framework 4.5预要求,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16302626/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com