While working on a VisualStudio project the need for having an Installer added was required. After searching the web I came across a MSDN article (http://support.microsoft.com/kb/307353) which provided the information required but it was somewhat ambiguous, so I have summarized it below:
- When you have your project finished and are ready to add a setup utility, click File > Add > New Project. (A description of the types of Setup Utilities can be found in the MSDN doc linked above.)
- For our implementation, we used “Setup Project” option under Other Project Types > Setup and Deployment to create a .msi install file. So select your project setup type, enter a name for it at the bottom and click OK.
- The new project will be added to your current project. To add files to this Setup Utility, right-click on the Setup Project, go to Add, then choose either Project Output (if you already have the application projec ready) or choose File to add miscellaneous files. In this tutorial we are going to continue with the Project Output option.
- In the Add Project Output Group select all components (by CTRL+clicking on each) then click OK. (You may want to select everything except for the Source Files.)
- While the Setup Project is selected, you can change the properties of it in the Properties window. You may want to change the Author, Manufacturer, Product Name and Title.
- Now that the setup utility is configured, you want to rebuild your entire solution, but before that we should add this utility to the build. Click Build > Configuration Manager and then put a check under Build for the Setup Utility record. Click OK.
- At the top of the Solution Explorer, right-click your Solution (that encompasses your projects) and then click Rebuild Solution to build it and create the .msi installer file.
- After a successful build, you can now test the install by right-clicking on the Setup Utility project and clicking Install/Uninstall.
- The .msi file will be placed under the Setup Project’s data folder in a directory with the same name as the Build Configuration chosen. ie: if you chose to build the Debug version of your program, the .msi file will be in {Setup Project name} > Debug.