Wix and .NET Framework (prerequisites)
Asked Answered
B

5

29

How can I have my Wix package to download the required .NET Framework when it's not yet installed in the client's machine? I already have the condition to check for the installed .NET version but I'm not sure how to have it downloaded and installed when not found.

ClickOnce does this automatically by checking the pre-requisites in the properties pages. I just need to have it done in Wix due to some other requirements.

Thanks!

Bohemianism answered 9/1, 2009 at 11:37 Comment(2)
Old Question, Wix now knows to do prerequisites.Infix
UPDATE: Have a look here: How To: Install the .NET Framework Using BurnDisentail
R
37

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

Ratha answered 9/1, 2009 at 11:54 Comment(0)
R
11

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

Raymonderaymonds answered 21/9, 2009 at 8:10 Comment(1)
LInk not workingDeonnadeonne
Z
9

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

UPDATE: updated URL to DotNetInstaller, Aug 2017.

Zenithal answered 15/6, 2010 at 8:47 Comment(2)
DotNetInstaller is my favorite bootstrapper so far.Amadou
I'm using this one with great success.Xray
A
7

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.

Aerify answered 10/9, 2012 at 20:11 Comment(0)
S
7

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

Stylist answered 20/3, 2013 at 14:44 Comment(2)
I have found not support for Net Core in there. Any known?Duplicity
@Duplicity - sorry this reply is so late - Stackoverflow has only notified me of your comment today (15th March 2022!!!) We haven't updated our client products to core yet so can't comment - will do as soon as I know :)Stylist

© 2022 - 2024 — McMap. All rights reserved.