I have a solution with an NMake project that fails with
an exception.  (Aside:  Even though the project is of type
NMake, I'm actually using it to call NAnt from inside
the VS IDE.)

The problem is that it can't find the theoretical output file.
There are actually several issues around this:

1.  The VCNMakeTool description in the .vcproj file
uses Output and not OutputFile as the attribute name.

2.  The method VcConfiguration::OutputPath only
knows about VCLinkerTool and VCLibrarianTool as
possible output generators.  This is bug 1.

3.  This method also doesn't correctly guard against
the possibility that GetToolSetting("VcLibrarianTool ...
can return null.  Ironically, it does it correctly for
VcLinkerTool, but that's probably because it has to
in order to figure out which one of these two should
be used.  But in general, nested function calls are
always suspicious, because they assume there's 
nothing to check from the return of the inner call.
I suggest avoiding nested function calls entirely; 
they're error-prone and difficult to debug.

Gary


-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - 
digital self defense, top technical experts, no vendor pitches, 
unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
Nant-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-users

Reply via email to