Calling NUnit from NAnt Pragmatically
Often times when calling NUnit tests from NAnt scripts we use the nunit2 NAnt task. However, as NAnt version march on and NUnit versions do as well, one gets into assembly binding problems. You might using NUnit 18.104.22.168 and NAnt's compiled with 22.214.171.124. This can be solved with assembly binding redirects but, eh. Poo. This week on the XP Mailing List Charlie Poole said this:
If it's not too much trouble, revise your testing target to use <exec> rather than <nunit2> Since my copy of NUnit itself is continually evolving, I use <exec> for testing NUnit. You could also keep both targets in the script, since the task will most likely be upgraded soon. - Charlie Poole
I'd been avoiding having to call NUnitConsole.exe from the exec task just because it felt "icky." However, seeing that Charlie and he has +1 Charisma when attacking with NUnit, I am rethinking my objections. Then he added:
One bit of good news: we're working on creating a stable interface for tools
like Nant to use across NUnit versions. - Charlie Poole
Yay! I await it eagerly. While you're reading this, go get TestDriven.NET and start reading Jamie Cansdale's Blog. I'm surprised more people aren't impressed that his stuff supports the Express SKUs considering that Add-Ins aren't supported (explicitly locked out) with Express.