Note that there are some explanatory texts on larger screens.

plurals
  1. POWhy does my nant task fail on CruiseControl (can't find nunit)?
    text
    copied!<p>My nant script fails when I run it under cruise-control on (Windows Server 2003), but works fine when run on the console.</p> <p>nant script (relevant section):</p> <pre><code>&lt;target name="compile" depends="init"&gt; &lt;echo message="Build Directory is ${build.dir}" /&gt; &lt;exec program="${framework::get-framework-directory(framework::get-target-framework())}\msbuild.exe" commandline="${solution.file} /m /t:Clean /p:Configuration=${project.config} /v:q" workingdir="." /&gt; &lt;exec program="${framework::get-framework-directory(framework::get-target-framework())}\msbuild.exe" commandline="${solution.file} /m /t:Rebuild /p:Configuration=${project.config} /v:q" workingdir="." /&gt; &lt;/target&gt; </code></pre> <p>cc-config:</p> <pre><code>&lt;tasks&gt; &lt;nant&gt; &lt;executable&gt;C:\Program Files\nant-0.86-beta1\bin\nant.exe&lt;/executable&gt; &lt;baseDirectory&gt;C:\Builds\WorkManagement\RC1&lt;/baseDirectory&gt; &lt;buildArgs&gt;-D:outputType=Xml&lt;/buildArgs&gt; &lt;nologo&gt;false&lt;/nologo&gt; &lt;buildFile&gt;WaterWorks.build&lt;/buildFile&gt; &lt;targetList&gt; &lt;target&gt;build&lt;/target&gt; &lt;/targetList&gt; &lt;buildTimeoutSeconds&gt;1200&lt;/buildTimeoutSeconds&gt; &lt;/nant&gt; &lt;/tasks&gt; </code></pre> <p>This has been working but I think a recent upgrade of nunit (to 2.5.1) has confused things.</p> <p>cc nant log:</p> <pre><code> Buildfile: file:///C:/Builds/WorkManagement/RC1/WaterWorks.build Target framework: Microsoft .NET Framework 3.5 Target(s) specified: build [loadtasks] Scanning assembly "NCoverExplorer.NAntTasks" for extensions. [property] Read-only property "outputType" cannot be overwritten. clean: [delete] Deleting directory 'C:\Builds\WorkManagement\RC1\build'. version: init: [tstamp] 15 July 2009 10:31:20. [mkdir] Creating directory 'C:\Builds\WorkManagement\RC1\build\net-3.5.win32-WaterWorksConsole-release\'. [echo] Current Directory: C:\Builds\WorkManagement\RC1 drop-database: create-database: compile: [echo] Build Directory is build/net-3.5.win32-WaterWorksConsole-release/ [exec] Microsoft (R) Build Engine Version 3.5.21022.8 [exec] [Microsoft .NET Framework, Version 2.0.50727.1433] [exec] Copyright (C) Microsoft Corporation 2007. All rights reserved. [exec] Microsoft (R) Build Engine Version 3.5.21022.8 [exec] [Microsoft .NET Framework, Version 2.0.50727.1433] [exec] Copyright (C) Microsoft Corporation 2007. All rights reserved. [exec] C:\WINDOWS\Microsoft.NET\Framework\v3.5\Microsoft.Common.targets : warning MSB3245: Could not resolve this reference. Could not locate the assembly "nunit.framework, Version=2.5.1.9189, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [exec] AddressTests.cs(1,7): error CS0246: The type or namespace name 'NUnit' could not be found (are you missing a using directive or an assembly reference?) : : </code></pre> <p>console command to run nant:</p> <pre><code>nant /f:WaterWorks.build build </code></pre> <p>Bit mystified! Can anyone point me in the right direction?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload