I had an issue recently when using the NServiceBus.Testing library (version 2.6.0.1504, which is a bit outdated now, but the problem is still interesting). The NServiceBus.Testing library comes with the popular Rhino Mocks framework built in, so by adding a reference to NServiceBus.Testing you automatically end up with the Rhino.Mocks…
There’s a great post here detailing how to add nested elements within a custom NAnt task. I was writing a task to create IIS websites, and wanted to be able to specify multiple bindings, for example: <IIS.Website.Create name=”MySite” physicalPath=”path”> <bindings> <binding type=”http” ip=”1.2.3.4″ port=”8080″ host=”domain.com” /> <binding type=”net.msmq” host=”localhost” /> </bindings> </IIS.Website.Create>…
You need to add a new framework configuration which (still?) doesn’t come by default with the download of NAnt. Insert the following into your NAnt.exe.config file (alongside the similar looking framework configurations): <framework name=”net-4.0″ family=”net” version=”4.0″ vendor=”Microsoft” description=”Microsoft .NET Framework 4.0″ sdkdirectory=”${path::combine(sdkInstallRoot, ‘bin’)}” frameworkdirectory=”${path::combine(installRoot, ‘v4.0.30319’)}” frameworkassemblydirectory=”${path::combine(installRoot, ‘v4.0.30319’)}” clrversion=”4.0.30319″> <runtime> <probing-paths> <directory name=”lib/net/2.0″ /> <directory name=”lib/net/neutral” /> <directory name=”lib/common/2.0″ /> <directory name=”lib/common/neutral” /> </probing-paths> <modes>…