Troy Laurin wrote:
Just a pie-in-the-sky (whatever that means)...
These kind of issues aren't all that uncommon in builds... how feasible is a meta-element <attribute> that can be nested under any element and decorates it with an attribute. If the <attribute> meta-element supported if/unless and lazy property evaluation, then it could be used to do the following:
<csc target="exe" output="...">
<attribute name="doc" value="${doc}" if="${property::exists('doc')}" />
...
</csc>
This looks like a good idea, but could be difficult to do generally across all tasks.
In the meantime, a simple approach that works today is to duplicate the task invocation with if/unless attributes, and use a property to indicate which to do:
In the setup targets:
<property name="generateDocs" value="true" /> <!-- or false -->
In the build targets: <csc target="exe" output="..." doc="..." if="${generateDocs}" /> <csc target="exe" output="..." unless="${generateDocs}" />
It's annoyingly verbose, but I use this idiom frequently.
Gary
------------------------------------------------------- This SF.Net email is sponsored by: New Crystal Reports XI. Version 11 adds new functionality designed to reduce time involved in creating, integrating, and deploying reporting solutions. Free runtime info, new features, or free trial, at: http://www.businessobjects.com/devxi/728 _______________________________________________ nant-developers mailing list nant-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nant-developers