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>
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>