Applications written using the .NET Framework often need to bundle the .NET framework and install it with their application. Wix 3.6 and later makes this easy with Burn.
Follow the instructions in Building Installation Package Bundles.
<Chain>
<PackageGroupRef Id="NetFx45Web"/>
<MsiPackage Id="MyApplication" SourceFile="$(var.MyApplicationSetup.TargetPath)"/>
</Chain>
The .NET PackageGroups use remote payloads to download the .NET redistributable when required. If you want to create a bundle that does not require Internet connectivity, you can package the .NET redistributable with your bundle. Doing so requires you have a local copy of the redistributable, such as checked in to your source-control system.
<Bundle>
<PayloadGroup Id="NetFx452RedistPayload">
<Payload Name="redist\NDP452-KB2901907-x86-x64-AllOS-ENU.exe"
SourceFile="X:\path\to\redists\in\repo\NDP452-KB2901907-x86-x64-AllOS-ENU.exe"/>
</PayloadGroup>
</Bundle>
Note that the PackageGroupRef in the bundle's chain is still required.
Any native bootstrapper application, including the WiX Standard Bootstrapper Application, will work well with bundles that include .NET.
Managed bootstrapper applications must take care when including .NET to ensure that they do not unnecessarily depend on the .NET framework version being installed.
<BootstrapperApplicationRef
Id="ManagedBootstrapperApplicationHost">
<Payload
Name="BootstrapperCore.config"
SourceFile="$(var.MyMBA.TargetDir)\TestUX.BootstrapperCore.config"/>
<Payload
SourceFile="$(var.MyMBA.TargetPath)"/>
</BootstrapperApplicationRef>
<configuration>
<configSections>
<sectionGroup name="wix.bootstrapper" type="Microsoft.Tools.WindowsInstallerXml.Bootstrapper.BootstrapperSectionGroup, BootstrapperCore">
<section name="host" type="Microsoft.Tools.WindowsInstallerXml.Bootstrapper.HostSection, BootstrapperCore" />
</sectionGroup>
</configSections>
<startup useLegacyV2RuntimeActivationPolicy="true">
<supportedRuntime version="v2.0.50727" />
<supportedRuntime version="v4.0" />
</startup>
<wix.bootstrapper>
<host assemblyName="MyBootstrapperApplicationAssembly">
<supportedFramework version="v3.5" />
<supportedFramework version="v4\Client" />
<!-- Example only. Replace the host/@assemblyName attribute with
an assembly that implements BootstrapperApplication. -->
<host assemblyName="$(var.MyMBA.TargetPath)" />
</host>
</wix.bootstrapper>
</configuration>