0
votes

I'm trying to migrate us from an old CruiseControl based build server to a new TeamCity one and having trouble with the old VB6 based components we still have.

We are using Nant scripts which is making the task easier but I've hit a roadblock with the vb6 nant task. I've installed nant.contrib.tasks so that the tag is now being recognised but I'm still getting an error...

[Step 1/1] D:\TeamCity\buildAgent\work\d2bf2472d554430\VB6Web\VB6Web.build(157,8):
'vb6' failed to start.
[Step 1/1] Step VB6Web Build (NAnt) failed.

I understand that this error "'vb6' failed to start." generally means it cannot find the vb6.exe but I cannot see how to specify it in the script.

According to the doco., "exename" is "The name of the executable that should be used to launch the external program." but is specified as a "Framework-configurable parameter". I've tried adding it to the vb6 tag as an attribute but that gave an Unexpected attribute error.

I just can't seem to find an example of how to specify the vb6.exe path as a Framework-configurable parameter anywhere... help, please.

1

1 Answers

5
votes

You don't need to set (and aren't meant to set) the exename parameter, the NAnt task will find the VB compiler for you. The exename framework configurable parameter is actually defined in the abstract class ExternalProgramBase, which the vb6 task inherits from.

The vb6 task requires that the Visual Basic IDE is installed so it can use vb6.exe. It'll find vb6.exe by looking up SOFTWARE\Microsoft\VisualStudio\6.0\Setup\Microsoft Visual Basic\ProductDir(refer the source code).

Since you indicated that this is a new build machine and you are reinstalling software (e.g. NAnt Contrib), it is likely you haven't reinstalled Visual Basic on this new build machine. If you have installed it, check the registry key and follow the path, you might need to reinstall Visual Basic to repair the registry key.