Export (0) Print
Expand All

How to: Add Predefined Custom Actions in the Custom Actions Editor 

Five predefined custom actions are included in Visual Studio 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 an Installer 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 Installer 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 How to: Create Installation Components - High-Level Process.

NoteNote

The dialog boxes and menu commands you see might differ from those described in Help depending on your active settings or edition. To change your settings, choose Import and Export Settings on the Tools menu. For more information, see Visual Studio Settings.

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 noteCaution

    If you use the Add File, Add Output, or Add Assembly 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

Community Additions

ADD
Show:
© 2014 Microsoft