Eric, 

One thing I ran into... I would *strongly* suggest that you do not
compile your dll to the same location as that pointed to by the
compatibility reference. If you do, and run into a compilation problem
you can (and probably will) end up in a situation where you cannot
recover the GUID's, and have to reset your references on all
"downstream" projects.

As often happens, there are two schools of thought about how to best
handle compatibility files. The first states that the binary
compatibility file should be updated manually, and only when an
interface actually changes. This is the one I have had most success
with... But you can get into trouble if someone *should* have updated
the compatibility file (because they introduced a new method, or changes
a method signature) and hasn't.

The other option is that when the project is rebuilt successfully, the
binary compatibility file should always be updated. If you choose this
option, want to store the compatibility file in source code control (a
good idea, IMHO), and are using continuous integration tools, then you
will need to consider the location carefully (or use appropriate
filtering) to prevent build loops.

Regards,
Richard

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of John Cole
Sent: Monday, August 14, 2006 08:57
To: 'Eric Fetzer'; Nant Users
Subject: Re: [NAnt-users] Conditional Compile based on VB6 Return

Eric,
  If you're using project or binary compatibility, you have to have the
original DLL (so VB can get its CSLID info).

  If your not, be sure that isn't set in the VBP, otherwise you get that
second error.

John
  

-----Original Message-----
From: Eric Fetzer [mailto:[EMAIL PROTECTED]
Sent: Friday, August 11, 2006 4:15 PM
To: John Cole; Nant Users
Subject: Re: [NAnt-users] Conditional Compile based on VB6 Return

John,

I'm having a problem with the vb6.make task (the new one).  This task
complains if the dll that I'm compiling exists in the first place.  So,
I deleted the dll and used the task again.  It now complains when it
tries to set the version compatibility:

Unable to set the version compatible component:
D:\MyProject\MyDll.dll
One or more of the properties in
'D:\MyProject\MyVbp.vbp' was bad.  Some or all of the properties might
not be set correctly.

(filenames changed to stay on the security dude's good
side)

Any clue what I need to do here?

Thanks,
Eric

--- John Cole <[EMAIL PROTECTED]> wrote:

> Eric,
>   We started using the newer try/catch tasks and removed that section.

> Here is our current vb6.make task:
> 
> ---------------------------------------
> <target name="vb6.make">
>               <call target="vb6.fixvbp" />
>               
>               <delete file="build.error"
> if="${file::exists('build.error')}" />
>               
>               <!-- write out ref file -->
>               <property name="tempexe32"
> value="${vbp::getvalue(vbp,
> 'ExeName32')}" />
>               <if test="${string::get-length(tempexe32) == 0}">
>                       <property name="tempexe32"
> value="${vbp::getvalue(vbp, 'Name')}" />
>               </if>
> <echo message="vbp: ${vbp}"/>
> <echo message="srcroot: ${srcroot}"/>
>               <property name="exename32"
> value="${string::substring(tempexe32, 1,
> string::get-length(tempexe32) -
> 2)}" />
>               <echo
>
file="${path::combine(path::combine(srcroot,project.module),
> path::get-file-name-without-extension(exename32) + '.ref')}"
>
message="${vbp::get-references(path::combine(srcroot,vbp),
> 'projects.txt')}"
> />
>               
>               <property name="conditional.compile" value="" />
>               <property name="conditional.compile" value="/D
RELEASETYPE=1" 
> if="${release.type == '1'}" />
>               <property name="conditional.compile" value="/D
RELEASETYPE=2" 
> if="${release.type == '2'}" />
>               <property name="conditional.compile" value="/D
RELEASETYPE=3" 
> if="${release.type == '3'}" />
>               <property name="conditional.compile" value="/D
RELEASETYPE=4" 
> if="${release.type == '4'}" />
>               <property name="conditional.compile" value="/D
RELEASETYPE=5" 
> if="${release.type == '5'}" />
>               
>               <trycatch>
>                       <try>
>                               <exec program="vb6.exe"
>                                       commandline="/m
> &quot;${path::combine(srcroot,vbp)}&quot;
> ${conditional.compile} /outdir
> &quot;${path::combine(srcroot,project.module)}&quot;
> /out build.error"
>                                       resultproperty="vb6.result"
>                               />
>                       </try>
>                       <catch>
>                               <!-- if this is not a library, then just
fail -->
>                               <property name="vbp.type"
> value="${vbp::getvalue(vbp, '^Type=.*')}" />
>                               <if test="${string::contains('.OleDll.
> .OleExe. .Control.', '.' + vbp.type + '.') == false}">
>                                       <fail message="vb6.exe failed.
This is not a library, cannot 
> switch compatiblity modes."/>
>                               </if>
>                               <trycatch>
>                                       <try>
>                                               <trycatch>
>                                                       <try>
>                                                               <!-- set
> compatiblity to project -->
>                                                               <echo
> message="${vbp::setvalue2(vbp, '^CompatibleMode=.*', '&quot;1&quot;', 
> '^MajorVer=.*', 'CompatibleMode=')}"/>
>                                                               
>                                                               <exec
> program="vb6.exe"
>       
> commandline="/m
> &quot;${path::combine(srcroot,vbp)}&quot;
> ${conditional.compile} /outdir
> &quot;${path::combine(srcroot,project.module)}&quot;
> /out build.error"
>                                                               />
>                                                       </try>
>                                                       <catch>
>                                                               <!-- set
> compatiblity back to binary -->
>                                                               <echo
> message="${vbp::setvalue(vbp, '^CompatibleMode=.*', 
> '&quot;2&quot;')}"/>
>                                                               <fail
> message="vb6.exe failed. Not a binary problem?"/>
>                                                       </catch>
>                                               </trycatch>
>                                               
>                                               
>                                               <!-- set compatiblity to
> binary -->
>                                               <echo
> message="${vbp::setvalue(vbp, '^CompatibleMode=.*', 
> '&quot;2&quot;')}"/>
>                                               
>                                               <exec program="vb6.exe"
>                                                       commandline="/m
> &quot;${path::combine(srcroot,vbp)}&quot;
> ${conditional.compile} /outdir
> &quot;${path::combine(srcroot,project.module)}&quot;
> /out build.error"
>                                               />
>                                               
>                                       </try>
>                                       <catch>
>                                               <fail message="vb6.exe
> failed. Not a binary problem?"/>
>                                       </catch>
>                               </trycatch>
>                       </catch>
>               </trycatch>
>               
>               <delete file="build.error"
> if="${file::exists('build.error')}" />
>       </target>
> ---------------------------------------
> 
> You are correct in that custom function only loaded a file into a 
> property (there was an issue with the built in version at one time, it

> stripped the last char, and I never went back to see if it got fixed).
> 
> As I said, I need to update my scripts on the ccnet site, I have lots 
> of really neat ones now :-)  Including a set of tasks that create MSM 
> files from VBPs (with the dependencies set correct).  Lots of 
> automagic stuff.
> 
> John
> 
> -----Original Message-----
> From: Eric Fetzer [mailto:[EMAIL PROTECTED]
> Sent: Friday, August 11, 2006 10:08 AM
> To: John Cole; Nant Users
> Subject: Re: [NAnt-users] Conditional Compile based on VB6 Return
> 
> John,
> 
> I ran into a function that you use in here that I can't find in NAnt 
> or NAntContrib called:
> 
>  file::get-file
> 
> Is this your own custom function, and if so, can I get a copy of it to

> put in the include file?  Looks like it just extracts the text out of 
> the file it targets.
> 
> Thanks,
> Eric
> 
> --- John Cole <[EMAIL PROTECTED]> wrote:
> 
> > Eric,
> >   We don't user DSR files too much (I think we
> have
> > an add-in that has them)
> > but nothing that we build with Nant.
> > 
> >   However, I did just write a little utility to update a csproj with

> > current COM clsid's (similar to the fixvbp target in those
> > vb6 nant scripts).
> > 
> >   As far as instructions go, I haven't made any,
> but
> > we have modified the
> > scripts a lot, adding the ability to restart a failed build where it

> > left off and merged our VB6 and .Net build scripts so
> we
> > can build everything in
> > a proper order.  I'll see about documenting them
> and
> > posting the new
> > scripts.
> > 
> >   We basically have a projects.txt file that is a comma separated 
> > file that lists the VB6 projects in the proper build order.
> > All of our tasks are
> > geared to parsing that file to perform the builds.
> > 
> 
=== message truncated ===


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com 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 sender. 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.

------------------------------------------------------------------------
-
Using Tomcat but need to do more? Need to support web services,
security?
Get stuff done quickly with pre-integrated technology to make your job
easier Download IBM WebSphere Application Server v.1.0.1 based on Apache
Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
NAnt-users mailing list
NAnt-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users


* C O N F I D E N T I A L I T Y N O T I C E *
-----------------------------------------------------------
The content of this e-mail is intended solely for the use of the individual or 
entity to whom it is addressed. If you have received this communication in 
error, be aware that forwarding it, copying it, or in any way disclosing its 
content to any other person, is strictly prohibited. Peek Traffic Corporation 
is neither liable for the contents, nor for the proper, complete and timely 
transmission of (the information contained in) this communication. If you have 
received this communication in error, please notify the author by replying to 
this e-mail immediately and delete the material from any computer.


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
NAnt-users mailing list
NAnt-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users

Reply via email to