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