Geeks With Blogs

The Life and Times of a Dev Yes, we're really that weird

First, I find it interesting that NCover is no longer going to be a free tool.  I hope he makes it, it's a great tool.

Second, using that free tool, I was having a problem getting things to go.  I'm using CCNET for continuous integration and for one reason or another, it needed to run as the local system account with interactive abilities.  As soon as we switched from a user account to this account, things started breaking.

I spent several days working on the problem and finally found this blog post.  I tried monkeying around with that for a while, and boy could you have fun with it . . . but ultimately, it didn't help.  I still didn't know why NCover was failing.  I could run it as a user on the system, but not as the system account, so I was pretty sure that it was the user context, but I couldn't see the exact error message to find out.

So my next step was to create an Exec task inside of my msbuild targets file passing in the ncover.console.exe command line and then piping all of the output from it to a text document. 

    <Exec ContinueOnError="false" command="$(NCoverExe) $(NUnitExe) /nologo /xml=%(TestAssembly.Filename)Test.xml %(TestAssembly.FullPath) //x %(TestAssembly.Filename)Coverage.xml //w $(MSBuildProjectDirectory) //ea ExcludeAttribute //a @(Assembly) >> output.txt"/>

This worked, I could now see why it was failing!  Yeah!  I was getting: Profiled process terminated. Profiler connection not established, even though it appeared to run all of my unit tests.

A quick search on the Internet yielded this blog post, which doesn't do a very good job of describing what's going on.  I was afraid that I wouldn't be able to log in with the user that needed the permissions, and the stuff that he put in the blog post wasn't particularly useful anyway, so I just decided to try and re-register the Coverlib.dll with regsvr32.

Rinse, Reboot, and YEAH!  Coverage is now working again.

Posted on Wednesday, September 26, 2007 10:54 AM | Back to top


Comments on this post: Fun with NCover

# re: Fun with NCover
Requesting Gravatar...
Hi,

I did the same thing, re-registered the dll but same issue.
Left by Sachin on Nov 13, 2007 2:09 PM

Your comment:
 (will show your gravatar)


Copyright © Robert May | Powered by: GeeksWithBlogs.net