NCover fails from MS Build

NCover fails from MS Build

Hi,

I am trying to get NCover to run using NUnit from an MSBuild script which is called from Cruise Control. This seems to work fine when all the unit tests pass.

However if one or more unit tests within the nunit project fail, NCover seems to return an error code which is interpreted by MSBuild as a task failure.

NCover seems to finish successfully with failing tests, and if run from the command line it is fine.

When run it from MSBuild, I get the following error:

MyProject.msbuil(25,5): error MSB6006: "NCover.Console.exe" exited with code 1.

Done Executing task "NCover" -- FAILED

This failure causes the entire MSBuild task to fail. Does anyone know what 'exited with code 1' or 'MSB6006' means, why it caused MSBuild to fail, and most importantly how I can stop it failing and returning this error code?

 

Many thanks!

Craig