Unknown Exception Thrown Running Nant Build Step

I am running TeamCity 8.1.3 on Windows 2012 Server.

Server and Agent are running as service with same service user account. I have checked permissions on the folders and files used by the build (I am just running a simple clean target right now until I see NAnt work). I can log in with the service account and run the NAnt build file from the commandline.

My build configuration has a Nant Build step:

Runner type:
        -- Choose build runner type --                                                                            .NET Process Runner             Ant             Command Line             Duplicates finder (.NET)             Duplicates finder (Java)             FxCop             Gradle             Inspections (.NET)             Inspections (IntelliJ IDEA)             IntelliJ IDEA Project                 Maven             MSBuild             MSpec             MSTest             NAnt             NuGet Installer             NuGet Pack             NuGet Publish             NUnit             Powershell             Rake             Visual Studio (sln)             Visual Studio 2003             Xcode Project                                     Runner for NAnt build files
Step name: Optional, specify to distinguish this build step from other steps.
Execute step:
                         If all previous steps finished successfully                          Only if build status is successful                          Even if some of the previous steps failed                          Always, even if build stop command was issued                 Specify the step execution policy.
Path to a build file:
The specified path should be relative to the checkout directory.
Build file content:
Working directory: Allows to start the build in some subdirectory of the checkout directory (use relative path).        <br />When not specified, build is started in the checkout directory.        <br /><strong>Note:</strong> All relative paths in TeamCity are relative to <em>checkout directory</em>.
Optional, set if differs from the checkout directory.
Targets:
Enter targets separated by space character.
NAnt home: *
Enter path to NAnt home directory.
Target framework:
            unspecified             net-1.0             net-1.1             net-2.0             net-3.5             net-4.0             mono-1.0             mono-2.0             mono-3.5             netcf-1.0             netcf-2.0             sscli-1.0             silverlight-2.0             moonlight-2.0      Shortcut for -t: option of NAnt.exe. Also imposes corresponding agent requirements.
Command line parameters:
Enter additional command line parameters to NAnt.exe.
Reduce test failure feedback time: Run recently failed tests first


When I run I get an error and none of the logging in NAnt is output so I am assuming that NAnt is crashing. I have tried NAnt v 0.85, 0.90, and 0.92. I have tried running NAnt inside and outside of the source path.

[16:29:36]TeamCity server version is 8.1.3 (build 30101)
[16:29:36]Checking for changes
[16:29:36]Will collect changes in 1 VCS roots
[16:29:36]Loading current repository state for VCS root 'XXXXX.XXX.XXXX'
[16:29:37]Waiting for completion of current operations for the VCS root 'XXXXX.XXX.XXXX'
[16:29:37]Detecting changes in VCS root 'XXXXX.XXX.XXXX' (used in Build XXX)
[16:29:37]Agent time zone: America/New_York
[16:29:37]Agent is running under JRE: 1.7.0_60-b19
[16:29:37]Publishing internal artifacts
[16:29:37]Clearing temporary directory: C:\TeamCity\buildAgent\temp\buildTmp
[16:29:37]Checkout directory: C:\TeamCity\buildAgent\work\cf5c3822d45a61a4
[16:29:37]Updating sources: server side checkout
[16:29:37]##teamcity[buildStatisticValue key='buildStageDuration:sourcesUpdate' value='187.0']
[16:29:37]Step 1/1: Build (NAnt)
[16:29:37][Step 1/1] ##teamcity[buildStatisticValue key='buildStageDuration:firstStepPreparation' value='109.0']
[16:29:37][Step 1/1] ##teamcity[buildStatisticValue key='buildStageDuration:buildStepRUNNER_1' value='0.0']
[16:29:37][Step 1/1] Starting: C:\TeamCity\buildAgent\tools\nant-0.85\bin\NAnt.exe -buildfile:C:\TeamCity\buildAgent\work\cf5c3822d45a61a4\build\nps.build.xml -targetframework:net-4.0 -extension:C:\TeamCity\buildAgent\plugins\dotnetPlugin\bin\JetBrains.BuildServer.NAntLoggers.dll -listener:JetBrains.BuildServer.NAntLoggers.NAntListener clean
[16:29:37][Step 1/1] in directory: C:\TeamCity\buildAgent\work\cf5c3822d45a61a4\build
[16:29:38][Step 1/1] Process exited with code 255
[16:29:38][Step 1/1] ##teamcity[buildStatisticValue key='buildStageDuration:buildStepRUNNER_1' value='824.0']
[16:29:38][Step 1/1] Step Build (NAnt) failed
[16:29:38]##teamcity[buildStatisticValue key='buildStageDuration:buildFinishing' value='31.0']
[16:29:38]Publishing internal artifacts
[16:29:38]##teamcity[buildStatisticValue key='buildStageDuration:artifactsPublishing' value='141.0']
[16:29:38]Build finished


Event Viewer
Faulting application name: NAnt.exe, version: 0.85.2478.0, time stamp: 0x4530edc8
Faulting module name: NAnt.exe, version: 0.85.2478.0, time stamp: 0x4530edc8
Exception code: 0xc0000005
Fault offset: 0x000041ce
Faulting process id: 0x101c
Faulting application start time: 0x01cf8b34066425c5
Faulting application path: C:\TeamCity\buildAgent\tools\nant-0.85\bin\NAnt.exe
Faulting module path: C:\TeamCity\buildAgent\tools\nant-0.85\bin\NAnt.exe
Report Id: 44418e74-f727-11e3-941c-0050568e6487
Faulting package full name:
Faulting package-relative application ID:


1 comment
Comment actions Permalink

Hi,

To investigate why the build fails please run agent via console using agent.bat file. Add -debug option for Nant build step command line parameter and run build. Check logs in console.
Also please check teamcity-agent.log file.

0

Please sign in to leave a comment.