I think I found a solution.
I've created two more Wix Burn projects, one for install the .NET4.5, and on for install the .NET4.0. Something like this:
<?xml version="1.0"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Bundle Name="Bootstrapper" Version="1.0.0.0" Manufacturer="VilmosNagy" UpgradeCode="844c755f-f02b-4dd3-8b9c-af2498f3128c">
<BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.RtfLicense"/>
<Chain>
<PackageGroupRef Id="NetFx40Web"/>
</Chain>
</Bundle>
</Wix>
And one for the .NET4.5. I compiled theese to .exe files. After I inserted into the original project one Packagegroup
, which installs one of theese .exes, based on the Windows version. Something like this:
<PackageGroup Id="DotNetInstall">
<ExePackage Id="Net45Installer"
Name="Net45Installer.exe"
InstallCommand="-q"
InstallCondition="VersionNT > v6.0"/>
<ExePackage Id="Net40Installer"
Name="Net40Installer.exe"
InstallCommand="-q"
InstallCondition="VersionNT < v6.1"/>
</PackageGroup>
It installs the .NET4.0 on XP. I'm trying it out on Win7, but I think (I hope) it'll be right.