Redistributing the .NET Framework with a bootstrapper
A bootstrapper checks for prerequisites and installs them if they're missing. So, we could install .NET or SQL Server if it's not present and then follow up by installing our own software. WiX Toolset adds a Visual Studio project template called Bootstrapper Project. In this recipe, we'll see how to deploy the .NET Framework with it.
Getting ready
Create a new setup project and call it InstallerThatNeedsDotNet
. We'll use a bootstrapper to bundle this MSI with the .NET Framework.
How to do it...
Add a bootstrapper project, reference NetFxExtension
within it, and then include one of its .NET packages in the bootstrapper:
Add a Bootstrapper Project to the solution by right-clicking on the solution in Solution Explorer and going to Add | New Project... | Windows Installer XML | Bootstrapper Project | OK:
NetFxExtension
contains packages to install .NET. Add it to the project by right-clicking on the References node in Solution Explorer and going...