Building an Installer Package (.msi) File

Once you have configured all elements of an application's installation in your installer project (by specifying folder and file locations, file associations, registry actions, and so on), you must build the project into an installer package (.msi) file. Then, you can distribute the .msi file to users who want to install your application.

If you change your installer project after building it, you must rebuild the installer project to test your changes.

For information about building or rebuilding an installer project into an installer package file, see these procedures in this topic:

  • Build an installer project into an installer package file.

  • Rebuild a changed installer project.

For information about building an installer project into a merge module (.msm file) or running an installer package file, see these topics:

To build an installer project into a package file

  1. Make sure the Build type project property (on the Build Tab of the Project Properties dialog box) is set to either:
    • Installer.

      –or–

    • Installer with Microsoft® Windows® Installer Loader.

Note   For information about the Windows installer bootstrap loader, see the Build Tab (Project Properties Dialog Box) topic.

  1. In the Project Explorer window, select the installer project.

  2. On the Build menu, click the option to Build your project.

    Note   The Build menu may include options for building either your project or the entire solution. If your project is part of a larger solution, you can select the Build Solution option to build the entire solution, including your installer project.

    Microsoft® Visual Studio® Installer builds your project and displays the message "Solution update succeeded" in the lower left corner of the development window when the build is complete.

To rebuild a changed installer project

If you make changes to an installer project after initially building it, you will probably want to rebuild the installer package to test your changes.

Important   Because the Windows installer maintains a cached version of the original installer package (.msi) file built from an installer project (.wip file), you must uninstall that original .msi file before you can successfully update it with any changes you have made to the installer project. If you use the Launch Installer command within Visual Studio Installer, you will uninstall any existing cached version of this .msi file and then launch the updated installer. For more information, see Launching an Installer Package File.

  1. In Windows Explorer, navigate to the .msi file you built with this project.

  2. Right-click the .msi file name.

    Note   Depending on your system settings, the .msi file extension may not be displayed. You can still right-click the file name.

  3. Select uninstall from the context menu.

  4. In Visual Studio Installer, select the installer project from the Project Explorer.

  5. On the Build menu, click the option to Build your project.

    Note   The Build menu may also include options for building or rebuilding the entire solution. If your project is part of a larger solution, you can select the Build Solution or Rebuild Solution option to rebuild the entire solution, including your installer project.

    Visual Studio Installer builds your project and displays the message "Solution update succeeded" in the lower left corner of the development window when the build is complete.