Note: This feature might not be available on all editions of HelpNDoc. Check HelpNDoc's feature comparison page to learn more.

Each build can include an unlimited number of pre-build and post-build actions:

  • Pre-build actions are executed before the generation process for that build
  • Post-build actions are executed after the generation process for that build

Build actions contain the following properties:

  • A name to uniquely identify the build action
  • A description to optionally describe the build action
  • Custom properties which are specific to each action types

Access the "Build actions" panel

Each build can have an independent list of build actions. To access the "Build actions" panel:

  • From HelpNDoc's "File" menu, click the top part of the "Generate help" button to show the "Generate documentation" window
  • Select a build in the build list
  • Click "Customize" if the build customization tabs are not visible yet
  • Navigate to the "Build actions" tab

Build action types

The following build actions can be created:

Build action type

Description

Run program

Run an external program available on the computer. List of available properties:

  • FileName: The path of the program to run
  • Arguments: Arguments to add to the program
  • WorkingDirectory: Full path of the current directory for the process. If not specified, it will be set to the current build's output directory
  • OkReturnCode: If provided, HelpNDoc checks the program's return value and displays an error if it is different from this value
  • ShowWindow: Shows a window for GUI applications. Disable it for console applications to only capture the output without displaying a console window

Run script

Run a script using the HelpNDoc API. List of available properties:

  • Path: Specify the path of the external script file to execute. 
  • Content: Specify the content of the script file.

Note: If both "Path" and "Content" fields are specified, the "Content" is used and the "Path" is ignored.

Show message

Show a message during the generation process. List of available properties:

  • IsModal: Specify if the message is shown as a blocking dialog box (when checked), or as a discreet message in the build generation log
  • Message: Textual content of the message to display

Add a build action

To add a build action, click the "Add action" button, then choose the build action type in the list. The newly created build action is added a the bottom of the existing build action list.

Edit a build action

Once a build action is selected in the list:

  • Click its checkbox to enable or disable it
  • Click its name, then click "Edit Name" to edit its name
  • Click its description, then click "Edit Description" to edit its description
  • Change its properties in the "Action Properties" panel

Delete a build action

To delete a build action, select it then click the "Delete action" button.

Move a build action

Build actions are executed in order from top to bottom:

  • To execute a build action earlier, select it then click the "Move Up" button;
  • To execute a build action later, select it then click the "Move Down" button.