views:

1178

answers:

2

Hi Everyone,

So this is a question for anyone who has had to integrate the building/compilation of legacy projects/code in a Team Build/MSBuild environment - specifically, Visual Basic 6 applications/projects.

Outside of writing a custom build Task (which I am not against) does anyone have any suggestions on how best to integrate compilation and versioning of legacy VB6 projects into MSBuild builds?

I'm aware of the FreeToDev msbuild tasks at CodePlex but they've been withdrawn at the moment.

Ideally I'm looking to version and compile the code as well as capture the compilation output (especially errors) for the msbuild log.

I've seen advice on encapsulating this functionality in a custom task, but really wondered if anyone has tried another solution (aside from executing shell commands) - In essence, does anyone have a "cleaner" solution?

Ideally, executing commands using would be a last resort..

+1  A: 

I am using Nant to build VB6 projects daily. This does resort using the Nant execute command to do the builds (we build 4 projects as part of one "solution").

It also allows you to label versions in your source control repository, get latest code, check in, check out, all the normal requirements, compile the update/setup programs copy the files to required locations and send emails of the results.

The logged results are fairly minimal though as you only get the output provided by a VB6 command line compile.

For versioning, I had to write a small app to extract the version number of my compiled executable and write it to a text file that Nant could then read and use (for labels, file names etc. (A bit of a pain but VB generated version numbers don't comply anyway).

For help with other non-core tasks see NAntContrib - from the NAnt link above.

Stuart Helwig
+1  A: 

Hi Rob

The VB6 task will be back on Monday. With regards to versioning, there is no explicit vb versioning task in the pack, however you could make use of the TfsVersion (TaskAction="GetVersion") and the File (TaskAction="Replace") tasks. If you think there is value in creating a new task to encapsulate / provide other functions, then please let me know and I will add it to the pack for the benefit of the whole community.

Apologies for the withdrawal, but come Monday I'm sure all will understand.

Regards

FreeToDev

Thanks, I'll take a look next week!
RobS