Understanding Custom Build Steps and Build Events
From within the Visual C++ development environment, there are three basic ways to customize the build process:
Custom Build Steps
A custom build step is a build rule associated with a project. A custom build step can specify a command line to execute, any additional input or output files, and a message to display. For more information, see How to: Add a Custom Build Step to MSBuild Projects.
Custom Build Tools
A custom build tool is a build rule associated with one or more files. A custom build step can pass input files to a custom build tool, which results in one or more output files. For example, the help files in an MFC application are built with a custom build tool. For more information, see How to: Add Custom Build Tools to MSBuild Projects and Specifying Custom Build Tools.
Build events let you customize a project's build. There are three build events: pre-build, pre-link, and post-build. A build event lets you specify an action to occur at a specific time in the build process. For example, you could use a build event to register a file with regsvr32.exe after the project finishes building. For more information, see Specifying Build Events.
Troubleshooting Build Customizations can help you ensure that your custom build steps and build events run as expected.
The output format of a custom build step or build event can also enhance the usability of the tool. For more information, see Formatting the Output of a Custom Build Step or Build Event.
Build events and custom build steps run in the following order along with other build steps:
Custom build tools on individual files
The C/C++ compiler
Linker or Librarian (as appropriate)
Custom build step on the project
custom build step on the project and a
post-build event run sequentially after all other build processes finish.