Visible Progress Home We make progress visible.
Search Site:
Resources > Process Tips  
VB Quality Zone
VB6 Coding Tips
Source Metrics
Process Tips
Peer Reviews
Build Process
Install Process
Testing Tips

Our Customers...
What Customers Say...

VS Law 2005 - VB.NET 2005 coding standards enforcement.
Try our products for free today.
VS Law .NET - VB.NET 2002/2003 coding standards enforcement.
Try our products for free today. VB Law - VB6 coding standards enforcement.
 
  VB Law - Quality assurance for Visual Basic source code.  
 

Visual Basic Build Process

The end result of the time and effort invested in a software project is one or more binary files that may be either executables and/or ActiveX components. If you only ever build standard executables that have no dependencies on any external components then you may get away with an informal build process. However, if you are building ActiveX components then it is essential that you apply the same level of consideration to the build process as you do to coding if you are to avoid the dreaded "Error 429 - ActiveX component can't create object".

Source Code Control

The first step in controlling the build process for your project, is to control the changes that team members can make to the project's source code. This is best achieved using one of the many tools available such as Microsoft Visual SourceSafe (supplied free with the Enterprise edition of Microsoft Visual Studio and Microsoft Visual Basic). The controlled source archive is then the one and only location for source code used in the build.

Dedicated Build Machine

The second step in controlling the build process is to obtain a separate machine, or at the very least a separate disk drive, configured with the operating system, development tools and agreed versions of dependent software components. Doing so ensures that all components in the build are compiled consistently. Only a limited number of trusted developers should be given access to the build machine.

Project Dependencies

In any system with more than a single binary, it is essential to determine the dependencies of each binary on external components and then on each other. The former is important as it will enable you to determine which files you will need to include in your installation set and the latter because it determines the order in which the binaries should be built.

Daily Builds

In his book, "Software Project Survival Guide", Steve McConnell recommends that all projects perform a "Daily Build and Smoke Test". This requires that project binaries are built regularly (preferably at least every day) and then subjected to basic testing to ensure that they do not "smoke" and are therefore fit for system testing.

Building binaries on a daily basis offers the following benefits:
  • Software development status and progress is more visible.
  • System and integration testing can start much earlier.
  • Errors introduced into the software can be detected earlier.
  • Build Configurations

    Using conditional compilation, it is possible to build alternative configurations of your application such as "debug" and "release" builds. Additionally, your "debug" version can be built with symbolic debug information included to work with advanced third-party debugging tools.

    During the development process it is useful to create "debug" builds which contain additional debug trace logging code to provide run-time information as an aid to debugging. This might be achieved through the use of conditional compilation argument such as 'DebugBuild=1'.

    Automated Builds

    Building component-based systems is time-consuming, complex and error prone without the help of an automated build tool. Fortunately, a number of such tools exist and you are recommended to take the time to evaluate available tools and purchase the most appropriate to your needs. The time saved will soon pay for the cost of the tool.

    A good build tool should support the following features:
  • Integration with your source code control software so that the latest source code can be obtained automatically from the archive prior to a build.
  • Determine component dependencies and therefore build order.
  • Include the ability to specify conditional compilation argument values and compiler optimisation switches.
  • Include the ability to script additional build tasks, which could include moving built binaries to a release area and launching an installation set builder etc.
  • How VB Law Can Help

    VB Law doesn’t build binaries, but it can greatly assist in the whole process by providing the following checks prior to commencement of the build process:
  • Ensure that projects only reference authorised components (including specific versions of authorised components if necessary).
  • Ensure that projects only reference authorised references (including specific versions of authorised references if necessary).
  • Ensure that component version information is completed correctly.
  • Ensure that advanced compiler optimisations are used appropriately.
  • Ensure that binary compatibility is set for ActiveX projects.
  • Ensure that ActiveX DLL base addresses are specified appropriately.
  • Ensure that particular build paths are used.
  • Ensure that the project help file is set.
  • Ensure that unattended execution and retained in memory options are set appropriately.
  • Ensure that the appropriate conditional compilation arguments are set.
  • Visit our downloads page and trial VB Law for free today.