Wix and .NET Framework (prerequisites)

不想你离开。 提交于 2019-11-27 00:39:06
Dirk Vollmar

UPDATE Aug 2017: This very nice answer now appears outdated. Please also read the other answers in the "thread" for a few different "bootstrapper options".


The MSI package created by Wix is not able to do that. Windows Installer is rather limited and one MSI file (your installer) is not allowed to call another MSI file (the .NET Framework installer).

You will have to create a so-called bootstrapper (a setup.exe file) which can check for the specified pre-requisites, download and install them as needed, and then launches your MSI installer.

One way to create the bootstrapper is by using Visual Studio or the MSBuild task GenerateBootstrapper. Here's a link giving more details:

http://wix.mindcapers.com/wiki/Bootstrapper

If you only want to provide a single installer to your users you might want to create a self-inflating installation package containing both the setup.exe file and your MSI package. You could do that with iexpress, which is coming with Windows.

Here's another link giving an example: http://www.clariusconsulting.net/blogs/pga/comments/42831.aspx

Wix will contain its own bootstrapper called burn. Have a look at: http://robmensching.com/blog/posts/2009/7/14/Lets-talk-about-Burn

Yan Sklyarenko

DotNetInstaller is also recommended by many developers as good and solid bootstrapper.

UPDATE: updated URL to DotNetInstaller, Aug 2017.

This is now supported as of WiX 3.6. The documentation is still sketchy, but for starters, look at How To: Install the .NET Framework Using Burn.

In wix 3.6 using the bootstrapper all you need to add .net 4.0 as a prerequisite to be downloaded if required is..

a) Add a reference to the file WixNetFxExtension.dll into your Bootstrapper / managed Bootstrapper app project

b) Add the following as the first item in your chain..

<PackageGroupRef Id="NetFx40Web"/>

That really is it!

Further info here : wixnetfxextension documentation

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!