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>…
This is a definite gotcha. I was writing a NAnt task that uses the registry to check for the existence of certain installed programs. I hit a problem where when I ran the task directly, it worked fine, but when I ran it through NAnt, it failed. Turns out this…
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>…