How to catch errors while executing VB Project using NANT?

92 views Asked by At

We are executing all the VB projects using below NANT script:Just example

<target name="VBCompile" >
<property name="failure.reason" value="VBCompile" />
<trycatch>
<try>
<foreach item="File" property="FileName" in="${VBProj.dir}">
<echo message="Creating Dll from: $:{FileName}" />
<exec basedir=${VBProj.dir} program=${VB6.exe} commandline=/MAKE ${FileName} outdir ${VBDll.dir}
</foreach>
</try>
<catch>
<fail message="${failure.reason}"/>
</catch>
<finally>
//..some codes
</finally>
</trycatch>
</target>

I want the scenario if we encountered some error while executing all VB projects, it should display the errors in Command Prompt itself and i don't want the error message to be dispalyed as alerts. I have tried using and ${failure.message}.Not working for me :( Please suggest any solution.

1

There are 1 answers

1
MarkJ On

Use the /out filename command line argument to the VB6 IDE/compiler to give a filename which will receive error messages.

You can explore the other command line options with the /? command line option.