A Setup project should be in the same Visual Studio .NET solution as the project whose output it will be installing. New Setup projects are added to a solution in the same way as any other project. (Either use File Add Project New Project... or use the solution item's context menu in the Solution Explorer, choosing Add New Project....) There are several different project types in the Add New Project dialog's Setup and Deployment Projects category, as Figure 6-2 shows.
|
All Setup projects work in much the same way. The main differences are related to the way in which the component will actually be deployed. The role of each project type is shown in Table 6-1.
Project type |
When to use |
---|---|
Setup Project |
For applications that will be installed on the end user's computer. |
Web Setup Project |
For applications that will be installed on or deployed through a web server. |
Merge Module Project |
For components that will be used by other applications. (Merge modules can be imported into either normal applications or web applications.) |
Cab Project |
For legacy component installation through a web browser. (Typically used for ActiveX controls.) |
Setup Wizard |
To create one of the four other project types, according to the selection made in the wizard. |
|
Cab projects are provided only for support of legacy scenarios. Cab files do not use Windows Installer, so there is a great deal less flexibility about how the target machine will be configured. You should use one of the other project types unless backward compatibility requirements force you to use a Cab file. Cab projects are discussed in more detail toward the end of the chapter.