我希望将Dot net framework 4.5作为我的应用程序的先决条件安装在任何可能的地方。 dot net framework 4.5是Windows Vista SP2.I想在Windows Vista SP2或以上的操作系统上安装dot net framework 4.5,并在Windows Vista Sp2(即Windows Xp机器)下面安装Dot net framework 4.0。我使用下面的代码。使用wix,如何安装Dot net framework 4.5 for Windows 7/8以及dot net 4.0来自xp和vista
<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,检查操作系统版本是否兼容安装。