【发布时间】:2014-02-05 06:07:18
【问题描述】:
我想尽可能安装 Dot net framework 4.5 作为我的应用程序的先决条件。因为 dot net framework 4.5 的最低操作系统要求是 Windows Vista SP2。我想在操作系统或更高版本上安装 dot net framework 4.5 Windows Vista SP2 和Dot net framework 4.0 低于Windows Vista Sp2(即Windows Xp 机器)。我正在使用下面的代码。
<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,检查操作系统版本是否兼容以安装它。
【问题讨论】: