While I see many advantages (and disadvantages) in NAnt, I can't think
of anything off the top of my head that it can do, but that can't be
done with ordinary make/bash (or other scripting language). NAnt
benefits from having a centralized repository of tasks, so that we don't
each have to build our own solution task from scratch, but that's a
packaging deficiency with make/bash, not a technical one. It's also
somewhat easier to grok than make, but on the other hand there are some
things that make can do easily, but which are tricky or more work to do
in NAnt - such as adding a project-wide pre or post compile step.
What sort of things did you have in mind?
just some feedback about an experience I had a few months ago (actually the first non-trivial thing I did with NAnt outside a strict build scope).
We have some third party library (namely, Syncfusion Essential Suite) which is massively used in our components (here the CCNet+NAnt setup drives 60+ solutions). A new release came out with a change in the licensing strategy (the content of the .licx file had to be updated), and also with a breaking change of assembly names (such as : each previous dependency was split in two, plus another 'Core' dll had to be referenced).
With NAnt I was able to :
- determine the project files where a change was required (thanks to fileset + patterns + recursivity + small c# custom task)
- create at the same place a new licx with the right content (when not available, with a file exist + copy)
- update the .csproj files ( = interacting with the xml content, based on a quick regexp + replace custom task)
- launch a test build by iterating over all the solutions files (fileset + pattern + exec) to ensure that everything was running smoothly
- do the checkout / checkin stuff with VSS automatically (using nant contrib vss tasks) during the whole operation
The whole operation took me one day (alone, and working in isolation from the team).
The other ways would have been to use the GUI-only tools provided and let people do their changes (= chaos, most likely!), or use a make / bash / batch script, but in my case I dare say I would have been much slower, and much more likely to cause errors.
The things I especially like about NAnt/Ant for such operations is the error handling (by default, it fails fast, where a script usually does not fail so quickly by default - it requires more care to achieve this), the tasks which are provided (such as interacting with VSS), and the cheap extensibility (custom tasks, or scripts, comes very handy).
I came to realize that NAnt can be pretty valuable even for one-shot operations such as this one. I really felt *power* when I did all this in parallel.
cheers
Thibaut
--
[blog] http://www.dotnetguru2.org/tbarrere