tags:

views:

285

answers:

3

Hi,

Does anyone know if VB6 IDE has the ability to run pre-build events prior to making and compiling the code (this is for creating a .vb file from a template file for subversion revision numbers to be compiled into the code using SubWCRev.exe).

Thanks

+3  A: 

There is no method to do this from the IDE. My company built a utility (in VB6) to do our automated build process including steps like you mention (updating version numbers, etc).

The essential trick is that you can run VB6.exe from the command line to compile projects. To see a list of all the option just goto the VB6 directory and type

VB6 /?

A list of all the command line options will appear.

This is what we use for our build utility.

VB6 /Make <project name> /out <errorlog filename>

We copy our project to a temporary project files and alter it using check boxes and parameters files. For example we can choose to compile everything as binary compatible or project compatible. The VB6 project files are easy to manipulate as they are just text. There are any number of things you can do if you write your own build utility.

RS Conley
A: 

We use Visual Build Pro to do this. It has built-in support for updating the version numbers of VB6 projects. Our project group includes ~7 ActiveX projects which is really painful to build within VB in the correct order, so we just always use Visual Build Pro because it automatically handles building the projects in the right order based on their dependencies.

A: 

There is some support in NAnt (or possibly NAnt.Contrib) for building vb6 projects. NAnt can then handle all of the pre/post build events. Just be prepared for some tweaking.

Eric Nicholson