Learning nAnt
I've volunteered to be the build master/coordinator the last
2 iterations of our web product. As we've gotten more
sophisticated we've pushed some of the functionality off to
Windows Services based applications. This has the net affect
of quadrupling the deployment headache we've been fighting
for the last few months.
To address this headache with
a little automation aspirin I turned to nAnt based on tones
of positive feedback from others who use it and the little I
used Ant in the past. My first order of frustration is the
documentation is nearly useless from a beginners
perspective. It assumes you know everything and just need to
look up the attribute for this or that. Once I figured out
what was happening from the source code (the blessings of
open source) things began to fall into place fairly quickly.
My big argument with nAnt is that it assumes you are using
nAnt to do all your builds and if you happen to use VS.NET
as your IDE you have to duplicate the effort of keeping the
solution and project files in sync with your build files. As
I didn't want to do this I used the exec task to launch the
devenv.exe utility to build the solution files.
This
first version of the build file worked great and I love the
declarative dependency capability. But this version lacked
VSS integration and as such was not getting the latest
shared assemblies from VSS (nor was it placing the latest
versions into VSS). So I compiled the SourceSafe project in
the Extras folder and tried to figure out the tasks and
attributes. Not terribly difficult, but a pain since there
is no documentation with this project. I added a couple of
targets to check a file out and in so I could test that
everything was working. It wasn't. Back to the source code.
A little while later I figured out that the
SourceSafeTasks.dll needed to be in the bin directory. Now
everything was working. Total deployment time: ~3.5 hours.
Version 2 of my build file works great, everything is refreshed from VSS just before compiling, and changes to shared DLLs are checked back in. Total deployment time: ~ 1.25 hours.
My next task will be to provide a build number from the command line and have nAnt copy the msi files to the appropriate network locations (complete with build numbered folders)