Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

Adding Installation Components to Your Projects

Installation components are used to perform actions during the installation of an application (for example, creating and configuring resources such as message queues or databases). There are two types of installation components: installer classes that can be added to any project, and predefined installation components that are associated with specific components. The procedure for adding installation components differs for each type.

To add an installer class to your project

  1. In Solution Explorer, select the project where you want to add the class. On the Project menu, choose Add New Item.
  2. In the Add New Item dialog box, select Installer Class.
  3. Override any methods for which you need to perform custom processing. For details, see Overriding Default Methods on Installation Components.

Microsoft Visual Studio .NET ships predefined installation components that can install resources associated with your MessageQueue components, EventLog components, Windows service applications, and PerformanceCounter components. When you work with an instance of one of these components or application types, you can select a hyperlink in the Properties window to automatically add the appropriate installer to your project.

After you add the first installation component to your project, a class named ProjectInstaller appears in your project. Each subsequent installation component you place in the project is also added to that class. The ProjectInstaller class is automatically registered with the deployment project for your solution.

Visual Studio .NET automatically copies property values that are needed to create your components to the installation component. In some cases, you may have to modify the copied values. For more information, see Configuring Installation Components.

To add a predefined installation component to your project

  1. In the designer, click the component for which you want to add an installation component, and then click the Add Installer link in the Properties window.
    Note   Predefined installation components are only available for MessageQueue, EventLog, and PerformanceCounter components, and for service applications. If you are working with a service application, you select the Component Designer surface rather than any particular component.

    A ProjectInstaller class appears in your project and an installation component is added to it.

  2. If necessary, access the ProjectInstaller class in the Code Editor and modify any of the values that were copied to the installation component. For details, see Configuring Installation Components.
  3. Override any methods for which you need to perform custom processing. For details, see Overriding Default Methods on Installation Components.
  4. Continue to perform steps 1 through 3 for each installation component your project needs.

See Also

Configuring Installation Components | Overriding Default Methods on Installation Components

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2015 Microsoft