Sanjoy, We have to handle the same thing here (though we just go to project then back to binary compatibility).
Here is a snippet of our build script that we use to handle this automatically: ----------------------------------------- <exec program="vb6.exe" commandline="/m "${path::combine(srcroot,vbp)}" ${conditional.compile} /outdir "${path::combine(srcroot,project.module)}" /out build.error" resultproperty="vb6.result" failonerror="false" /> <!-- <echo message="vb6 returned ${vb6.result}"/> --> <if test="${int::parse(vb6.result) != 0}"> <if test="${file::exists('build.error')}"> <property name="build.error.file" value="${file::get-file('build.error')}" /> <if test="${string::contains(build.error.file,'The binary compatibility DLL or EXE contains a parameter type or return type whose definition can not be found') or string::contains(build.error.file, 'BadImplementsRefInCompatLib')}"> <!-- <echo message="ok here"/> <fail message="vb6.exe returned failure."/> --> <echo message="${vbp::setvalue(vbp, '^CompatibleMode=.*', '"1"')}"/> <exec program="vb6.exe" commandline="/m "${path::combine(srcroot,vbp)}" ${conditional.compile} /outdir "${path::combine(srcroot,project.module)}" /out build.error" /> <echo message="${vbp::setvalue(vbp, '^CompatibleMode=.*', '"2"')}"/> <exec program="vb6.exe" commandline="/m "${path::combine(srcroot,vbp)}" ${conditional.compile} /outdir "${path::combine(srcroot,project.module)}" /out build.error" /> </if> <ifnot test="${string::contains(build.error.file,'The binary compatibility DLL or EXE contains a parameter type or return type whose definition can not be found') or string::contains(build.error.file, 'BadImplementsRefInCompatLib')}"> <fail message="vb6.exe failed. Not a binary problem?"/> </ifnot> </if> <ifnot test="${file::exists('build.error')}"> <fail message="vb6.exe returned failure. No build.error file!"/> </ifnot> </if> ----------------------------------------- I'm not using the VB6 task because it didn't have conditional compile options at the time (I think it does now). I haven't looked to see if you can save off the result file either. file::get-file is a custom script we have to load a file into a property. There is a NAnt equivalent for that now (loadfile?) that should work here. I posted a few other VBP nant scripts a few months ago, you may want to search for those and see if you find them useful. Hope this helps. John Cole -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of sanjoy Sent: Thursday, April 07, 2005 12:43 AM To: nant-users@lists.sourceforge.net; nant-developers@lists.sourceforge.net Subject: [nant-dev] [Help][Nant-Users][USE NANT To Compile VB6.0 Code] Dear All, I want to know can I use NANT to compile VB6.0 code. In VB6.0 we have the problem of compiling DLLs and OCX files which very offen breaks compatibility and we have to compile 3 stages. 1.No Compatibility 2.Project Compatibity 3.Class Compatibity I request to provide me a solution to this problem. Thanks Sanjoy ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ nant-developers mailing list nant-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nant-developers ------------------------------------- This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ nant-developers mailing list nant-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nant-developers