NCover.Console.exe (return code was 20000)

NCover.Console.exe (return code was 20000)

We are running NCover using NANT and TeamCity, about 30% of the time we are getting the following :

[exec] Exception [exec] [exec] -- Top-level exception (System.Exception) [exec] No data was collected. [exec] -- Stack Trace [exec] at NCover.Framework.ProfilerDriver._GetCoverageData() [exec] at NCover.Framework.ProfilerDriver.Execute() [exec] at NCover.ConsoleMain.ConsoleMain.Main(String[] args) [exec]

BUILD FAILED

C:\TC-Build\work\55c934587b3e89af\build24420.tmp(31,6): External Program Failed: C:\Program Files\NCover\NCover.Console.exe (return code was 20000)

Total time: 891.3 seconds.

when it works we get We are only using one TC build agent, on the same server as the TC server. We have tried using //reg and registering manually The machine is win2003 standard svr x64 R2 Many thanks,

Micah.


RE: NCover.Console.exe (return code was 20000)

micah,

I've elevated this post to a support request and should have an initial answer for you soon.

Stephen


RE: NCover.Console.exe (return code was 20000)

Was there any resolution on this issue? I have the same error but in my case it happens on all of my builds. I am running win 2003 standard sp2 x86.


RE: NCover.Console.exe (return code was 20000)

I figured this out. I had to regsvr32 NCover.Lib.x86.dll on my TeamCity server... Doing a complete install of NCover would probably have worked too.


RE: NCover.Console.exe (return code was 20000)

I am having the same problem. I tried running the regsvr32 command on the build agent but it didn't help. I see this same problem every time, not intermittently. Any ideas?


RE: NCover.Console.exe (return code was 20000)

are you using regsvr with administrative permissions? are you using the //reg argument? are you running on an x64 machine?


RE: NCover.Console.exe (return code was 20000)

My ncover command is below, so it looks like I am using the //reg argument with "registerProfiler=True". Unless I am missing something. My build process is running as an admin user and I ran regsvr32 as a user with admin permissions (same as my build user)

Thanks, David


RE: NCover.Console.exe (return code was 20000)

yeah, you're using the //reg argument. Is the build server running on a 64-bit machine?


RE: NCover.Console.exe (return code was 20000)

Nope, a 32 bit machine. Windows XP Professional Version 2002 Service Pack 2.


RE: NCover.Console.exe (return code was 20000)

are you running ncover from within TeamCity as part of a build script? have you tried running from the console on the build server? are you running NCover from within NCover Explorer on the build server?


RE: NCover.Console.exe (return code was 20000)

I am running ncover from within team city, which calls a Nant script. I haven't tried running it from the console on the build machine just yet. Y can't run it from the command line because it teamcity nunitlauncher process must be invoked from the teamcity service.

Also, I am not running ncover from within ncover explorer in my build script. I first run ncover and then I run ncover explorer to merge the output from a few different builds after the tests run.


RE: NCover.Console.exe (return code was 20000)

I've spent the past few days (since your last post) setting up a situation similiar to your on our build server and trying to recreate the problem. Although I've learned about a lot of gotcha's, I haven't been able to recreate the problem, even though I've tried several different variations on the build setup. So there's obviously something different about our build configurations.

1) Have you tried using the NAnt task to run NCover? NCoverExplorer can also produce an exec version of the custom task you posted, lets see if the problem is related to the custom task.

2) what other tools are involved in your build process? Are you using Typemock, for example?