I just factored out a build file snippet into a separate target, 
changing the <if></if> task containing the snippet to an if= attribute 
on the new target.  Much to my surprise, the <include> task within the 
snippet stopped working.

Doing this triggered my memory, and sure enough the documentation says 
that <include> must be at the top level.  Hence

    <target ...>
       <include...>
    </target>

fails.  However,

    <target ...>
      <if ...>
        <include ...>
      </if>
    </target>

not only works just fine, but does exactly what I want it to do. 

So the question is why can't it be made to work anywhere?  I know the 
<include> task has been discussed before, resulting in some 
clarification in the docs, but I don't recall any discussion as to why 
it must work this way.

And whatever you do, don't fix it so that this no longer works :-).  I'm 
depending upon this behavior.  (I could work around it, but it's an 
annoying complication.)

Gary



_______________________________________________
nant-developers mailing list
nant-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-developers

Reply via email to