我想尽可能安装点网框架 4.5 作为我的应用程序的先决条件。因为点网框架 4.5 的最低操作系统要求是 Windows Vista SP2。我想在 Windows Vista SP2 或更高版本的操作系统上安装点网框架 4.5和Windows Vista Sp2(即Windows Xp机器)以下的Dot net framework 4.0。我正在使用下面的代码。
<PropertyRef Id="NETFRAMEWORK40FULL" />
<PropertyRef Id="NETFRAMEWORK45" />
<Condition Message="This application requires .NET Framework 4.0 Full or .NETFramework 4.5. Please install the .NET Framework then run this installer again.">
<![CDATA[Installed OR NETFRAMEWORK40FULL OR NETFRAMEWORK45]]>
</Condition>
<Chain>
<PackageGroupRef Id="NetFx40Web" />
<PackageGroupRef Id="NetFx45Web" />
<PackageGroupRef Id="SqlServer2008R2" />
</Chain>
但它给出了错误
The Windows Installer XML variable 'WixMbaPrereqPackageId' is declared in morethan one location.
The Windows Installer XML variable 'WixMbaPrereqLicenseUrl' is declared in more than one location.
我认为我们不能使用 WixNetFxExtension 库同时安装 DotnetFramework4 和 DotnetFramework 4.5。我现在有什么选择来实施它?我是否必须手动编写 PackageGroup 来安装 Dot net Framework 4.5 检查操作系统版本是否兼容以安装它。