Sim*_*mon 7 windows-installer wix wix3.11
我们有一个依赖于已安装的 .NET Framework 4.5 的应用程序。Wix 安装程序应自动检测何时未安装 .NET Framework 4.5(或更高版本)。这与以下 wix 声明配合得很好:
<PropertyRef Id="NETFRAMEWORK45"/>
<Condition Message=".NET Framwork 4.5 is not installed.">
<![CDATA[Installed OR NETFRAMEWORK45]]>
</Condition>
Run Code Online (Sandbox Code Playgroud)
我们的目标:Wix 安装程序应自动下载并安装 .Net Framework 4.5。看来“burn”提供了一种机制,让安装程序自动安装.NET Framwork:http://wixtoolset.org/documentation/manual/v3/howtos/redistributables_and_install_checks/install_dotnet.html。该文档定义了对 .NET Framework 安装文件的引用:
<MsiPackage Id="MyApplication" SourceFile="$(var.MyApplicationSetup.TargetPath)"/>
Run Code Online (Sandbox Code Playgroud)
但我们不想将 .NET Framework 添加到我们的安装程序中。安装程序应自动将其下载到将执行安装程序的目标系统上。
我们怎样才能做到这一点?
请参阅 NetFx45Web 软件包组参考:
http://wixtoolset.org/documentation/manual/v3/customactions/wixnetfxextension.html
有关在没有包组引用的情况下如何工作的更多信息,请参阅类似的示例:
带有 wix burn 的 vcruntime140 网页下载