Tuesday, February 19, 2008

CC.Net project unexpected build failure

The last couple of weeks (after migrating to a new build server) I had strange behavior with two web projects building on CruiseControl.NET.
The build project is configured to build after a code check in on subversion. But after the check in, the build fails. A manual 'force build' successfully builds the project.
The build log only said there was an error durring the build, but without a clue what went wrong (and especially when you want to blame project members for checking in bad code ;).

Digging in the ccnet.log I finally found the the cause;

[project-x development:WARN] Process timed out:
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\MSBuild.exe
Process id: 3380. This process will now be killed.


The question is, why can't there be a descriptive error in the build log of the project?
After increasing the seconds in the <tastk><MSBuild><Timeout> element, everything indeeds goes fine.

1 comment:

Phil Leggetter said...

I've just spent a day with the very same problem. I use CCNET to execute the MSBUILD task and basically do all my tasks (unit tests, merging DLLs, obfuscation and building the installer) in there. So, this task can take a while. Little did I know that by adding more unit tests that I was increasing the time the MSBUILD task would take and slowly edging to the 600 seconds timeout limit.
All of a sudden my build fails, although if I run the msbuild.exe directly on my project file everything works perfectly. Then I google and see your comment about the process being killed/timing out in CCNET.

Why oh why doesn't the build log make it OBVIOUS that this is the reason that the build has failed.

Thanks very much for blogging this piece of information. Probably save me another day or so of frustration.