Build Events page of Visual Studio project properties

Use the Build Events page of project properties in Visual Studio to specify pre-build and post-build events for a Synergy project.

To access the Build Events page, select a project node in Solution Explorer, select Project > Properties from the Visual Studio menu, and then select the Build Events tab.

Note the following:

Note

Environment variables set on the Build Events page apply before or after the build, not during the build. To set environment variables for the build, use the Environment Variables page or the Common Properties page. (Settings on the Environment Variables and Common Properties pages are not used for pre-build or post-build events.)

Pre-build event command line

Enter commands you want executed before the build starts. Use commands that are valid at a command prompt or in a .bat file. For example, for a traditional Synergy project, you could add a command that runs a batch file that builds UI Toolkit window scripts:

call $(MSBuildThisFileDirectory)build_my_scripts.bat

Note that if you specify a .bat file, the name of the file should be preceded by "call" (without quotes). Otherwise, subsequent commands may not run.

To enter long commands, click "Edit Pre-build".

Run the pre-build event

Specifies conditions under which the pre-build event is run:

Always Run pre-build event whenever a build is started for the project.
If the compile files have changed Run pre-build event only if a compile file has changed.
If the content files have changed Run pre-build event only if a content file has changed.
If the compile or content files
have changed
Run pre-build event if either a compile file or a content file has changed.

Post-build event command line

Enter commands you want executed after the build ends. Use commands that are valid at a command prompt or in a .bat file. Note that if you specify a .bat file, the name of the file should be preceded by "call" (without quotes). For example: call C:\MyFile.bat. Otherwise, subsequent commands may not run.

To enter long commands, click "Edit Post-build".

Run the post-build event

Specifies conditions under which the post-build event is run:

Always Run post-build event even if the build fails.
On successful build Run post-build event only if the build succeeds.