This package contains a C# project template that will compile an MSI package as a resource. It will compile as an application that requires elevation. At that point, it executes the MSI package. This allows the MSI to run custom actions in the UI sequence that require administrative privileges. Once installed, a project called Neovolve.Bootstrapper will appear under C# projects. The project template includes an IWizard implementation to make creating the bootstrapper project a little easier. The bootstrapper project template needs to know where to find the MSI package to include in its compilation process. There are two possibilities for this to happen. The MSI would either be available somewhere on the file system and not related to the current solution, or the MSI is going to be a compilation output of another project in the solution. The wizard looks at the current solution and determines whether there is a project that compiles an MSI file. Realistically, only WiX projects (tested with 3.5) are supported for this. If no projects are available, then the user is only able to select an existing MSI from the file system. If the solution does have an MSI project, then the wizard will allow this project to be selected. Once a project is selected or a file path is defined, the wizard displays the path that defines the MSI package source. The wizard will calculate this value as a relative path where possible. It will also determine if the path contains bin\Debug or bin\Release and allow $(OutputPath) to be substituted in. The MSBuild task will then calculate this value at runtime. If an existing solution project is selected as the MSI package source, the wizard then creates a build dependency between the bootstrapper and the WiX project. This will ensure that the WiX project will be built first when the bootstrapper project is built. |