Creating Custom Build Rules
Depending on the type of project you are working with, you may need to have certain tasks completed prior to and after building your project. The Custom Build tab of the <Project> Properties dialog box allows you to specify commands that are to be executed before or after building a project. There are two text boxes on this tab - Pre-build and Post-build. The format of the commands entered into these text boxes should be identical to the commands used in a batch file (such as Autoexec.bat).
To add pre-build or post-build commands
-
On the Project menu, click <Project> Properties (where <Project> is the name of the project that is currently selected in the Project Explorer).
The <Project> Properties dialog box appears.
-
Select the Custom Build tab.
-
In the Configuration drop-down list, choose the build configuration for which you want the Custom Build tab settings to apply.
-
Select the Pre-build command(s) box if you want to specify commands that will occur before your project is built. Select the Post-build command(s) box if you want to specify commands that will occur after your project has been built.
-
Enter the commands you wish to specify for the selected build command type. Only one command should be specified on each line of the text box. When entering commands into the text box, you can use standard batch commands to specify conditions under which the commands should execute.