Chapter 6. Setup and Deployment

Once you have created and perfected your application, you will no doubt be keen to get it into the hands of your users. Unfortunately, putting a program onto a computer in such a way that it will run successfully can be a nontrivial process. There may be many files to copy, potentially to several different locations. Even if your application consists of just one file, you will need to check that suitable versions of the libraries it requires have been installed, and you may want to provide the option to add an entry to the Start menu or the Desktop. In addition to file copies, system configuration changes may be required.

Visual Studio .NET's Setup projects make light work of the installation process. Setup projects create installers that can copy all of your application's files onto the target computer, making sure that the right libraries are available. They can perform any necessary configuration, such as adding registry entries or creating virtual directories on IIS. They also provide an installation user interface that can collect configuration information from the user if required. It integrates with Windows' Add/Remove Programs feature, providing automatic support for uninstallation.