On May 11, 2007 5:56 AM, Bob Archer <[EMAIL PROTECTED]> wrote: > Yep.... should be doable. > > Something like: > > <foreach property="csproj.name"> > <in> > <items basedir="basepath"> > <include name="**.csproj" /> > </items> > </in> > <do> > <msbuild project="${csproj.name}" /> > </do> > </foreach> > > BOb > > > > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Erik > Ramfelt > Sent: Friday, May 11, 2007 8:23 AM > To: nant-users@lists.sourceforge.net > Subject: [NAnt-users] Finding files and executing an ant task on result? > > Hi > > Im wondering if there any way to go through a bunch of sub folders, > and find all csproj files and compile those using msbuild? > What I need is a way to go though all folders and find csproj files > that match a certain regex (all ends with MsgLib.csproj), call the ant > task MSBuild using the found file name. > > Is this possible with nant? > > Thanks > //Erik >
Did you get this to work? I'm unable to get foreach/item to screen by extension. IE: <foreach item="File" property="filename"> <in> <items> <include name="**.dll" /> </items> </in> <do> ... </do> </foreach> Does not traverse subdirectories (only the current directory). Changing it to <include name="**" /> finds everything including in all subdirs (which would work, but takes a LONG time with a big source tree). It would appear that foreach/item isn't treated like fileset. -- -Chris ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ NAnt-users mailing list NAnt-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nant-users