After a brief flirtation with MSBuild, I've been spending some quality time again 
recently with NAnt. I'm creating a rather complex build script that I'm using to 
generate courseware. There's a couple of things that have been bugging me about NAnt, 
and which I've fixed in my private build, but I'm wondering about whether there's 
concensus among the devs to perhaps consider a few changes.
 
First the minor nit: the foreach task takes an enumerated type of "Folder" when 
enumerating directories. This is inconsistent with the rest of NAnt which uses 
attributes like "dir" on the mkdir and delete tasks, for example.
 
Now for the major problem: during a "Folder" style foreach, the property is set to the 
full path of the subdirectory. I can understand why this is useful in the context of 
enumerating all descendents of an "in" directory. However, there are cases where you 
want to simply extract the simple name of the directory and not its full path. 
Consider replicating a directory structure under a different build directory:
 
Samples
  Sample1
  Sample2
 
Sample1 and Sample2 must be compiled into a new directory tree
 
Build
  Samples
    Sample1
    Sample2
 
This requires me to discover the names of Sample1 and Sample2 - which is not possible 
without parsing the directory path. I've got a hacked version of foreach that sets the 
property to DirectoryInfo.Name - would folks consider adding an additional enumeration 
called "ChildFolders" or "ChildDirectories" to the type list?
 
-John
http://www.iunknown.com
 


-------------------------------------------------------
This SF.Net email is sponsored by OSTG. Have you noticed the changes on
Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
one more big change to announce. We are now OSTG- Open Source Technology
Group. Come see the changes on the new OSTG site. www.ostg.com
_______________________________________________
nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers

Reply via email to