This tutorial will guide step by step on how to create installers for your Visual Studio 2010 solutions. In this tutorial we presume to already have a Visual Studio solution for which we want to create an install package. Later on, we will edit the information from the installer project and add another Visual Studio project to the solution.

1. Open Visual Studio solution

If Visual Studio 2010 is not currently running, start it and open the solution for which you want to create the install package.

Visual Studio Solution

2. Add an Advanced Installer Project to the solution

Once the Visual Studio solution is loaded we are going to add an Advanced Installer Project by following these steps:

  • From the “New Project” dialog of Visual Studio select Advanced Installer Project
  • In the “Solution” field select Add to solution option
  • Optionally, in the “Name” field you can write a name for your Advanced Installer Project

Add Advanced Installer Project

  • Press [ OK ] to add the project to the solution

By default, when adding an Advanced Installer Project the build output of the solution will be automatically added to the installer project.

Visual Studio solution included in the installer project

3. Create the first install package

In this step we are going to create an installation package without modifying any of the installer settings.

From the “Build” menu of Visual Studio select the “Build Solution” option. Visual Studio will build all the projects from the solution, will include the output in the Advanced Installer Project and will build the installation package. After the build is completed successfully you will obtain two files: Hello_World.exe which is the output from the C++ project and AIInstallProject.msi which is the installation package.

Visual Studio first build

4. Edit the installer project

In the above section we created an installation package without editing any information about the installation package. Using the viewer that comes with any Advanced Installer Project you can edit basic information about your installer like: Product Details, Launch Conditions or Install Parameters.

Product Information

Let's suppose we have an Enterprise edition of Advanced Installer. By default, the installer project will be created based on a Freeware license. Since we want to use features from the Enterprise edition, like selecting a theme for the installation dialogs, we will need to upgrade our project type:

  • Press the [ Edit in Advanced Installer ] button to open your installer project in Advanced Installer
  • From the “Project” menu select “Options...”
  • Navigate to the Project Type Tab and select Enterprise
  • Press the [ OK ] button

Now, that we have an Enterprise project we have full access to all the available Enterprise features.

  • In order to change the dialog theme go to Themes Page
  • From the right view select the desired theme and variation for your installer dialogs
  • Save the project and exit Advanced Installer

Visual Studio will ask you if you want to reload the installer project since it was modified. Press the [ Yes ] button.

5. Add another Visual Studio Project to the solution

If an Advanced Installer Project is added to a solution it will automatically import the build output and all useful information related to the projects from the solution. If later, the existing projects are modified or another project is added to the solution the import operation must be redone.

  • From the “New Project” dialog of Visual Studio select Visual C# project type
  • In the “Solution” field select Add to solution option
  • Press the [ OK ] button. The new project will be added to the solution
  • Rebuild the solution

Even if three files will be generated the install package will contain only the original project from the solution. The other project build output will not be included. An easy way to see this is from the “Files and folders” page.

New Project added

6. Create the final install package

To include the second project in the installer package:

  • Select the Installer_Project.aip file from the "Solution Explorer"
  • From the context menu select the Redo import option
  • Check that both projects output builds are included in the installer package from the “Files and Folders” page

Both projects are included in the installer project

  • Rebuild the solution
  • Test the new installation package

The newly created installer will contain all the projects from the solution.

7. Project Dependencies

Sometimes, if projects are added to the solution after the Advanced Installer Project, the build dependencies are not correctly set. Because of this the Visual Studio solution will not be properly built. The Advanced Installer Project must be built last, after the other projects from the solution were built in order to successfully create the installation package.

In order to fix this issue and set the build dependencies so that the Advanced Installer Project is built last, the following steps must be taken:

  • Select the Installer Project using the "Solution Explorer"
  • From the context menu select the Project Dependencies option
  • In the "Depends on" section select both projects

NoteOptionally from the context menu select the Project Build Order option. In the "Build Order" list be sure the Advanced Installer Project is the last one.

8. Automatically import .VDPROJ files

If you have solutions that contain older Visual Studio Deployment projects (.vdproj) you can automatically convert them to an Advanced Installer project and have it included in your solution, replacing the old VDPROJ. Just open the solution in Visual Studio 2012, with our Advanced Installer VS extension installed, and VS will prompt you to accept the conversion from VDPROJ to AIPROJ (Advanced Installer VS project).

The new project Advanced Installer project will contain all the resources from the old VDPROJ. If you want to customize it further more just use the "Edit in Advanced Installer" button, available when you open the .aip file in Visual Studio.

The End

This concludes our tutorial. For more information about using Advanced Installer please visit Advanced Installer User Guide.