title: CruiseControl and NANT build
body: <p>I'm testing a very simple script to try and run my ant build file from CruiseControl.NET.  I followed the steps I found on the net of how to do this but i keep getting nAnt task failed in CruiseControl without any explanation and yet when i run the NAnt build script separately, it runs fine.</p>
  
  <p>Can anybody take a look at my build script, the Ccnet.config file and the output in the log and point me in the right direction?</p>
  
  <p>My XmLib.build NAnt file</p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;project default="start"&gt;
      &lt;property name="code.directory" value="C:\SHS" /&gt;
      &lt;property name="server.code.directory" value="${code.directory}\XmLib" /&gt;
      &lt;property name="server.code.project" value="${server.code.directory}\XmLib.sln" /&gt;
  
       &lt;target name="start"&gt;
            &lt;echo message="Building XmLib Component " /&gt;
       &lt;/target&gt;
  &lt;/project&gt;
  </code></pre>
  
  <p>My output when I ran my build file using Nant.exe via command line.</p>
  
  <pre><code>Buildfile: file:///C:/SHS/Build Scripts/XmLib.build
  Target framework: Microsoft .NET Framework 4.0
  Target(s) specified: start 
  
  
   start:
  
   [echo] Building XmLib Component 
  
   BUILD SUCCEEDED
  
   Total time: 0.4 seconds.
  </code></pre>
  
  <p>My CruiseControl.NET config file</p>
  
  <pre><code>&lt;cruisecontrol xmlns:cb="urn:ccnet.config.builder"&gt;
  &lt;project name="XmLib"&gt;
    &lt;tasks&gt;
      &lt;nant&gt;
        &lt;executable&gt;C:\Program Files (x86)\NAnt\bin\nant.exe&lt;/executable&gt;
        &lt;baseDirectory&gt;C:\SHS\Build Scripts&lt;/baseDirectory&gt;
        &lt;buildFile&gt;XmLib.build&lt;/buildFile&gt;
        &lt;logger&gt;NAnt.Core.XmlLogger&lt;/logger&gt;
        &lt;targetList&gt;
          &lt;target&gt;start&lt;/target&gt;
        &lt;/targetList&gt;
        &lt;buildTimeoutSeconds&gt;80&lt;/buildTimeoutSeconds&gt;
      &lt;/nant&gt;
    &lt;/tasks&gt;
    &lt;publishers&gt;
        &lt;xmllogger logDir="C:\tmp" /&gt;
    &lt;/publishers&gt;
  &lt;/project&gt;
  &lt;/cruisecontrol&gt;
  </code></pre>
  
  <p>The error I get when I try to run this via CruiseControl.NET using its dashboard.  </p>
  
  <pre><code>  &lt;cruisecontrol project="XmLib"&gt;
    &lt;request source="BUILDHPSMV" buildCondition="ForceBuild"&gt;Administrator triggered a build        (ForceBuild) from BUILDHPSMV&lt;/request&gt;
    &lt;parameters&gt;
    &lt;parameter name="$CCNetArtifactDirectory" value="C:\Program Files (x86)\CruiseControl.NET\server\XmLib\Artifacts" /&gt;
    &lt;parameter name="$CCNetBuildCondition" value="ForceBuild" /&gt;
    &lt;parameter name="$CCNetBuildDate" value="2013-01-16" /&gt;
    &lt;parameter name="$CCNetBuildId" value="a7fb196a3193468e8d8505f7db7641d5" /&gt;
    &lt;parameter name="$CCNetBuildTime" value="17:06:44" /&gt;
    &lt;parameter name="$CCNetFailureTasks" value="System.Collections.ArrayList" /&gt;
    &lt;parameter name="$CCNetFailureUsers" value="System.Collections.ArrayList" /&gt;
    &lt;parameter name="$CCNetIntegrationStatus" value="Unknown" /&gt;
    &lt;parameter name="$CCNetLabel" value="1" /&gt;
    &lt;parameter name="$CCNetLastIntegrationStatus" value="Failure" /&gt;
    &lt;parameter name="$CCNetListenerFile" value="C:\Program Files(x86)\CruiseControl.NET\server\XmLib\Artifacts\XmLib_ListenFile.xml" /&gt;
    &lt;parameter name="$CCNetModifyingUsers" value="System.Collections.ArrayList" /&gt;
    &lt;parameter name="$CCNetNumericLabel" value="1" /&gt;
    &lt;parameter name="$CCNetProject" value="XmLib" /&gt;
    &lt;parameter name="$CCNetProjectUrl" value="http://BUILDHPSMV/ccnet" /&gt;
    &lt;parameter name="$CCNetRequestSource" value="BUILDHPSMV" /&gt;
    &lt;parameter name="$CCNetUser" value="Administrator" /&gt;
    &lt;parameter name="$CCNetWorkingDirectory" value="C:\Program Files(x86)\CruiseControl.NET\server\XmLib\WorkingDirectory" /&gt;
    &lt;/parameters&gt;
    &lt;modifications /&gt;
    &lt;integrationProperties&gt;
    &lt;CCNetArtifactDirectory&gt;C:\Program Files(x86)\CruiseControl.NET\server\XmLib\Artifacts&lt;/CCNetArtifactDirectory&gt;
    &lt;CCNetBuildCondition&gt;ForceBuild&lt;/CCNetBuildCondition&gt;
    &lt;CCNetBuildDate&gt;2013-01-16&lt;/CCNetBuildDate&gt;
    &lt;CCNetBuildTime&gt;17:06:44&lt;/CCNetBuildTime&gt;
    &lt;CCNetFailureUsers /&gt;
    &lt;CCNetFailureTasks&gt;
      &lt;task&gt;NAntTask&lt;/task&gt;
    &lt;/CCNetFailureTasks&gt;
    &lt;CCNetIntegrationStatus&gt;Failure&lt;/CCNetIntegrationStatus&gt;
    &lt;CCNetLabel&gt;1&lt;/CCNetLabel&gt;
    &lt;CCNetLastIntegrationStatus&gt;Failure&lt;/CCNetLastIntegrationStatus&gt;
    &lt;CCNetListenerFile&gt;C:\Program Files(x86)\CruiseControl.NET\server\XmLib\Artifacts\XmLib_ListenFile.xml&lt;/CCNetListenerFile&gt;
    &lt;CCNetModifyingUsers /&gt;
    &lt;CCNetNumericLabel&gt;1&lt;/CCNetNumericLabel&gt;
    &lt;CCNetProject&gt;XmLib&lt;/CCNetProject&gt;
    &lt;CCNetProjectUrl&gt;http://BUILDHPSMV/ccnet&lt;/CCNetProjectUrl&gt;
    &lt;CCNetRequestSource&gt;BUILDHPSMV&lt;/CCNetRequestSource&gt;
    &lt;CCNetWorkingDirectory&gt;C:\Program Files(x86)\CruiseControl.NET\server\XmLib\WorkingDirectory&lt;/CCNetWorkingDirectory&gt;
    &lt;CCNetUser&gt;Administrator&lt;/CCNetUser&gt;
    &lt;CCNetBuildId&gt;a7fb196a3193468e8d8505f7db7641d5&lt;/CCNetBuildId&gt;
    &lt;LastIntegrationStatus&gt;Failure&lt;/LastIntegrationStatus&gt;
    &lt;LastSuccessfulIntegrationLabel&gt;UNKNOWN&lt;/LastSuccessfulIntegrationLabel&gt;
    &lt;LastModificationDate&gt;1/15/2013 5:06:44 PM&lt;/LastModificationDate&gt;
    &lt;/integrationProperties&gt;
    &lt;build date="2013-01-16 17:06:44" buildtime="00:00:00" error="true"buildcondition="ForceBuild"&gt;&lt;/build&gt;
    &lt;/cruisecontrol&gt;
  </code></pre>