我的应用程序编译基于.NET 2.0框架,但我希望用户能够在Windows 8上安装它而不会提示安装.NET 3.5。为了提供一些背景信息,我有以下的app.config文件:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0"/>
<supportedRuntime version="v2.0.50727"/>
</startup>
<runtime>
<NetFx40_LegacySecurityPolicy enabled="true"/>
</runtime>
</configuration>
我的问题是,在WiX .wxs文件中,我需要指定应用程序将运行的每个版本的框架吗,例如:
<PropertyRef Id="NETFRAMEWORK20"/>
<Condition Message="This application requires .NET Framework 2.0. Please install the .NET Framework then run this installer again.">
<![CDATA[Installed OR NETFRAMEWORK20 OR NETFRAMEWORK30 OR NETFRAMEWORK35_CLIENT OR NETFRAMEWORK35 OR NETFRAMEWORK40CLIENT OR NETFRAMEWORK40FULL OR NETFRAMEWORK45]]>
</Condition>
或者,我可以简写它并指定类似于这样的内容吗:
<PropertyRef Id="NETFRAMEWORK20"/>
<Condition Message="This application requires .NET Framework 2.0. Please install the .NET Framework then run this installer again.">
<![CDATA[Installed OR NETFRAMEWORK20 OR NETFRAMEWORK40CLIENT]]>
</Condition>