8

我想尽可能安装点网框架 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 检查操作系统版本是否兼容以安装它。

4

1 回答 1

1

Wix 有使用 Burn 将 .Net 框架与您的应用程序一起安装的文档。

http://wixtoolset.org/documentation/manual/v3/howtos/redistributables_and_install_checks/install_dotnet.html

于 2014-01-22T21:09:09.797 回答