Vb.net 如何在使用NANT执行VB项目时捕获错误?

Vb.net 如何在使用NANT执行VB项目时捕获错误?,vb.net,vb6,nant,nantcontrib,Vb.net,Vb6,Nant,Nantcontrib,我们正在使用下面的NANT脚本执行所有VB项目:仅举一个例子 <target name="VBCompile" > <property name="failure.reason" value="VBCompile" /> <trycatch> <try> <foreach item="File" property="FileName" in="${VBProj.dir}"> <echo message="Creating Dll

我们正在使用下面的NANT脚本执行所有VB项目:仅举一个例子

<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>


使用VB6 IDE/编译器的
/out filename
命令行参数给出一个将接收错误消息的文件名

您可以使用
/?
命令行选项浏览其他命令行选项。

谢谢您的回复:)我已经尝试使用out,但它只给出了原因代码,没有给出错误消息。