WiX引导程序适用于.NET 4.5。

3
我是WiX的新手,已经创建了一个独立的安装程序。我想检测系统是否安装了.NET 4.5,并提示用户安装。我的开发环境是Visual Studio 2010,使用WiX 3.7工具集。
从一些教程中我看到,我应该使用WiX 3.6 Burn或在Visual Studio 2010中使用WiX引导程序项目模板。
但是,当我安装Wix 3.7时,我没有引导程序模板(我不确定是否缺少要下载的扩展)。
使用引导程序模板比使用Burn更好吗?有什么区别?

我看到很多关于Burn的参考资料,但是在我的Wix 3.7发行版中没有burn.exe。 - Stealth Rabbi
2个回答

2
你需要创建一个名为“Bootstrapper Project”的新项目(此模板必须在你的Visual Studio 2010安装中,与Windows Installer XML相关)。以下是一些非常好的博客文章,包含手册:

1
Wix Burn是Wix Bootstrapper的另一个称呼,它们是同一样东西。虽然它们在称呼时可能会交替使用"wix burn"和"wix bootstrapper",但它们指的都是同一个东西。以下是我的Wix Bootstrapper代码,它会检查.NET版本并在安装我的.msi之前下载并安装它。您需要添加对WixNetFxExtension.dll的引用。

<?xml version="1.0" encoding="UTF-8"?>


<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"  xmlns:bal="http://schemas.microsoft.com/wix/BalExtension" xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">


  <Bundle Name="MyProgramInstaller" Version="1.0.0.0" Manufacturer="myCompany" UpgradeCode="yourcodehere">

<!-- here's the license statement, would suggest you update this to something more useful. -->
    <BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.RtfLicense" />
    
   
  <Chain>
    <!-- here's the .net download installer you can change this using the following chart -->
    <!-- http://wixtoolset.org/documentation/manual/v3/customactions/wixnetfxextension.html -->
      <PackageGroupRef Id="NetFx451Web"/>
      <MsiPackage Id="myProgram" SourceFile="$(var.SolutionDir)SetupProject1/bin/Release/myProgramInstaller.msi"/>
  </Chain>

    
    
 </Bundle>
</Wix>


这是一个很好的答案。只想补充一点,如果您有一个创建MSI的Wix安装程序项目,您可以在引导程序项目中引用它,然后编写 <MsiPackage Id="MyApplication" SourceFile="$(var.WixInstallerProject.TargetPath的名称)"/> - Todilo

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接