Navigation:  Samples > Visual Studio >

VStudio.bld Sample

Previous pageReturn to chapter overviewNext page

This sample demonstrates an entire build process that uses Microsoft Visual Studio 2008 thru 2015.


The build recursively registers the components, builds several Visual Studio projects, and increments a build number.  Custom actions are used to build the projects, which will prevent unnecessary rebuilds, increment versions when building, set project base addresses, etc.


If any step fails, the failure steps are executed, which send an e-mail with the error output from the failed step.  You may need to update the e-mail address and modify the server settings.  The SMTP_SERVER, TO_EMAIL, and FROM_EMAIL project macros should be updated to appropriate values, and a username and password assigned to the Send Mail steps if necessary.


The first time the project is built, all the projects are built; if built again (close and reopen the project or reset the build status and build), VisBuildPro detects that they are up-to-date and none of the projects get built.


Several standard system macros are used, such as PROJDIR, to generically determine the file locations, FAILSTEP_OUTPUT to show the error message from a previous step, DOSCMD to execute operating system commands, DATETIME to log the current date/time.  A LOGFILE project macro is also defined to log all build output to VStudio.log in a temporary directory.


Note: This sample project is located in the Visual Studio subfolder of the Samples path.