Hi Yogesh,
<items> is a fileset, so the attribute should be "basedir" instead of "in".
this works for me:
<?xml version="1.0"?>
<project name="test" description="test" default="test">
<property name="OutputFolder" value="C:/Dir/"/>
<target name="test">
<foreach item="File" property="filename">
<in>
<items basedir="${OutputFolder}">
<includes name="**/m*.dll"/>
<includes name="**/m*.exe"/>
</items>
</in>
<do>
<regex pattern="^(?'outputfilename'.*)\.(?'extension'\w+)$"
input="${filename}"/>
<!-- Do your fxcop thing here -->
<echo message="${filename}" />
</do>
</foreach>
</target>
</project>
Regards,
Jasper.
-----Original Message-----
From: Yogesh Shetty [mailto:[EMAIL PROTECTED]
Sent: donderdag 21 augustus 2003 13:23
To: [EMAIL PROTECTED]
Subject: [nant-dev] foreach
I am not able to figure out what is the problem in below fragment.. it use
to work before
<echo message="${OutputFolder}"/>
<foreach item="File" property="filename">
<in>
<items in="${OutputFolder}">
<includes name="**/m*.dll"/>
<includes name="**/m*.exe"/>
</items>
</in>
<do>
<regex
pattern="^(?'outputfilename'.*)\.(?'extension'\w+)$"
input="${filename}"/>
<exec program="fxcopcmd" commandline="/f:${filename}
/r:${OutputFolder}\RNWSFxCopRules.dll /o:${outputfilename}.xml" />
<echo message="${filename}"/>
</do>
</foreach>
This should give me the list of all filename starting with m.. spend an hour
in resolving this issue but no luck...
Regards
Yogesh S
_________________________________________________________________
Over 6,70,000 brides and grooms.
http://www.bharatmatrimony.com/cgi-bin/bmclicks1.cgi?74 Click here to join
for free.
-------------------------------------------------------
This SF.net email is sponsored by: VM Ware
With VMware you can run multiple operating systems on a single machine.
WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines
at the same time. Free trial click here:http://www.vmware.com/wl/offer/358/0
_______________________________________________
nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers
-------------------------------------------------------
This SF.net email is sponsored by: VM Ware
With VMware you can run multiple operating systems on a single machine.
WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines
at the same time. Free trial click here:http://www.vmware.com/wl/offer/358/0
_______________________________________________
nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers