NAnt, WiX and How to Build and Deploy a Utility Library

Submitted on Aug 29, 2008, 9:01 a.m.

Well - on the off chance that I get enough votes at BarCamp in the morning... here's my presentation for BarCamp Bangkok 2.

A while back - and thanks mainly to an open source project created by Alexander Groß (a Now Playing Plugin for Windows Live Writer) I discovered the Windows Installer XML (WiX) project.  WiX is pretty cool. It's an XML script based compiler and linker that creates .MSI install packages. Because it's script and command-line driven - it fits well into automated build and deployment systems (using build tools like NAnt or MSBuild).

I've generally kept all my utility and helper classes in a separate solution, separated into namespaces for Strings, Data, Web, Math, Image helpers etc... all static classes (slowly being updated with extension method versions as well).

So for my demo at BarCamp - I've created a SampleUtils solution - with NAnt and WiX and a fairly well organized solution that shows how this can all be put together.

The solution layout looks like this...

(screen shot to the right).

Again - if I get the chance. I'll do a quick run through of the NAnt build file (I've annotated the targets). And then a quick look at the WiX scripts. Demo the build process and then deploy the library using the installer - followed by a Console app that uses the library to make a few calls... (at least that's the plan).

Here are links to the source package for the demo (all lib and tools included so it will build as soon as you run build-release.bat) as well as the slide deck. (5.43MB) (61KB).

And here are the links at the end of the slide deck...

Wish me luck... :-)


Technorati tag: Barcampbangkok2