I have the following targets:
<target name="SetReferencesToFile">
<echo message="Using References File: ${References}" />
<fileset id="ReferencesFileset">
<includesfile name="${References}" />
</fileset>
<foreach item="File" property="Filename">
<in>
<items refid="ReferencesFileset" />
</in>
<do>
<echo level="Verbose" message="Referencing ... ${Filename}" />
</do>
</foreach>
</target>
<target name="SetReferencesToList">
<fileset id="ReferencesFileset">
<include name="${Framework}\System.dll" />
<include name="${Framework}\System.Data.dll" />
<include name="${Framework}\System.XML.dll" />
</fileset>
<foreach item="File" property="Filename">
<in>
<items refid="ReferencesFileset" />
</in>
<do>
<echo level="Verbose" message="Referencing ... ${Filename}" />
</do>
</foreach>
</target>
If SetReferencesToList is called, I get the appropriate output from the foreach loop, but if the SetReferencesToFile target is called, I do not get the echo from the foreach loop. The file defined in References must exist or the SetReferencesToList target is used, so I know that the problem isn't whether or not the file exists. There must be a bug in how the fileset gets enumerated when using the <includesfile> type.
I have also discovered I cannot set a fileset within an <if> task, I get an invalid task error on the <fileset> node, thus the reason I'm using separate targets.
I'm using nightly build from 2004-11-10-0.85.
Trane eBusiness
QED Team
Phone: 931-905-5386
Fax: 931-648-5901
