Export (0) Print
Expand All

Adding Predefined Custom Actions in the Custom Actions Editor

Five predefined custom actions are included in Visual Studio .NET to install Event Log, Message Queue, Performance Counter, Service, and Service Process components. When these components are configured as installation components, they are wrapped in a ProjectInstaller class and are recognized by the deployment system as a custom action.

The installation component is added to the project as a class, and when built it becomes part of the project outputs.

The ProjectInstaller class contains its own state management methods, allowing it to roll back an installation when an error occurs. When a predefined custom action fails to install, the entire deployment project will also be aborted and will return the system to its pre-install state.

Adding a predefined custom action is a two-step process: you first add a component to the application to be deployed and configure it as an installation component, and then add the installation component to your deployment project. For details on creating an installation component, see Creating Installation Components - High-Level Process.

To add an installation component to a deployment project

  1. Select a folder in the Custom Actions Editor.
  2. On the Action menu, choose Add Custom Action.
  3. In the Select item in project dialog box, open the folder that contains the outputs of the project containing the installation component, and select the primary output.

    If the outputs of the project containing the installation component haven't previously been added to the deployment project, click the Add Output button and select the primary output.

    Caution   If you use the Add File, Add Output, or Component button to add an item to the Select item in project dialog box and subsequently cancel the dialog box, the items are still added to the deployment project. If you don't want the items in the deployment project, you can remove them in Solution Explorer.

See Also

Properties for the Custom Actions Editor | Adding and Removing Custom Actions in the Custom Actions Editor | Adding Predefined Custom Actions in the Custom Actions Editor | Walkthrough: Creating a Custom Action | Creating Installation Components - High-Level Process | Custom Actions Management in Deployment

Show:
© 2014 Microsoft