I've created a WiX installer which I want to install .NET 4.5 if it is missing.
To do this, I've added <PackageGroupRef Id="NetFx45Web" />
to my chain.
The strange problem I have is, on a machine with .Net 3.5 (Windows Vista), everything works fine and WiX installs .NET 4.5 correctly, but on a machine with .NET 4.0 (Windows 7), nothing happens and the installer just executes my application without installing .NET 4.5 first, which then crashes because it requires .NET 4.5
Is there anything I'm missing or is this a bug?
I assume that you're using the NetFx45Web package from the NetFxExtension, which means you're using WiX's built in way of detecting it.
I'm guessing that by application, you mean your managed BA. You have to make sure you setup your BootstrapperCore.config properly. If your MBA needs 4.5 or later, then make sure the supportedRuntime element has 4.5 and not 4, same with the supportedFramework element.
If you're using a managed Bootstrapper Application then you should make sure that the supportedFramework
set in the BA is the same as the supported framework of your actual application. Specifically, if your application requires the Full .Net 4.5 version then make sure you do not have the Client Profile version set as a supported framework otherwise the BA will not download and install the Full version if it finds the Client Profile installed. I personally think this is a bug in the managed BA however it was reported to WiX and closed as "notabug". So, remove this from you BootstrapperCore.config:
<supportedFramework version="v4.5\Client" />
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With