使WiX Bootstrapper可以与.NET 4.0进行自举 [英] Making WiX Bootstrapper work for bootstrapping with .NET 4.0
问题描述
我一直希望通过安装.NET 4.0和我自己的应用程序来使引导程序正常工作.我查看了几个博客和教程,但无法正常工作.
I've been looking to make my bootstrapper work with installing .NET 4.0 and my own application. I reviewed several blogs and tutorials, but I can't get it to work.
我读过堆栈溢出问题 在WiX中启动/调用引导程序 ,您需要在引导程序中同时调用这两者.我的引导程序仅调用.NET 4.0安装程序.这是应该调用这两个部分的部分:
I read in Stack Overflow question Initiate / call bootstrapper in WiX that you need to invoke both in the bootstrapper. My bootstrapper only invokes the .NET 4.0 installer. This is the part that should invoke both parts:
<Chain>
<PackageGroupRef Id="NetFx40Redist" />
<MsiPackage SourceFile="C:\my app.msi" Cache="yes" Visible="no" After="NetFx40Redist"></MsiPackage>
</Chain>
它仅调用packagegroupref.在安装.NET 4.0程序包时,会出现错误.这可能很容易而且很小,但是我找不到它.
It only invokes the packagegroupref. While installing the .NET 4.0 package, it gives an error. It's probably something easy and small, but I can't find it.
推荐答案
以下对我有用:
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Bundle Name="Bootstrapper1" Version="1.0.0.0" Manufacturer="Test" UpgradeCode="5e5f0f1e-58e0-42e5-8306-37533d677535">
<BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.RtfLicense" />
<Variable Name="InstallFolder" Type="string" Value="[ProgramFilesFolder]Test\App"/>
<Chain>
<PackageGroupRef Id="NetFx40Web" />
<MsiPackage
Id="Setup"
Compressed="yes"
SourceFile="$(var.SetupProject1.TargetPath)"
Vital="yes">
<MsiProperty Name="INSTALLLOCATION" Value="[InstallFolder]" />
</MsiPackage>
</Chain>
</Bundle>
</Wix>
确保添加项目和WixNetFxExtension
作为对bootstrapper项目的引用.我发现此博客非常有用.
Make sure you add your project and WixNetFxExtension
as references to the bootstrapper project. I found this blog very helpful.
这篇关于使WiX Bootstrapper可以与.NET 4.0进行自举的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!