I spent the afternoon last Friday using NAnt to set up a build script for Redland Shire Council's new web site that will use Microsoft Content Management Server 2002. There was a bit of a tricky part in migrating the .sdo database. Here is the basic procedure...
- Download NAnt (I used the latest stable build, but if you have plenty of time on your hands you might want to experiment with the latest nightly builds.) . You will also need NAntContrib for the VSS tasks. I just copied the NAntContrib binaries into the NAnt\bin folder and that seems to work file.
- Write a console application to migrate the .sdo database. This source code in C# depends on an interop dll (CMSSDClientInterop.dll). It was mostly written/adapted by Christopher Walker from Microsoft Consulting Services.
- Write an NAnt build file to:
a) clean out destination
b) copy files from VSS
c) build the solution
d) copy to the desination server.
- Run NAnt.exe -buildfile CMS.build to run the script.
NAnt documentation is very sparse. The best thing to do is study the NAnt.build file that comes with NAnt. It's full of good examples. I tried various ways to compile the VS.NET solution, but I ended up usuing good old devenv.exe. The “solution” task that comes with NAnt is buggy in the verion 0.84 and I wasn't about to play around compiling the latest builds of the beta. You could also use the csc tasks to perform individual compiles of projects, but that seems to lend itself to too much maintenance of the script as projects are added etc.
I also need to tidy up the NAnt build script to use properties (variables) for all the folder paths, etc.
posted on Wednesday, October 06, 2004 9:27 PM