views:

713

answers:

4

I've successfully got PartCover 2.3 working with VS 2008 on my 64-bit machine.

I'm now trying to get it to work with VS 2010 and NUnit 2.5.3. I've got NUnit using the correct CLR version, but I can't get PartCover to produce any output. All I get is an "empty" report XML file:

<PartCoverReport date="2010-03-30T16:09:05.1009099+01:00" />

How do I get PartCover 2.3 (or 2.2, I guess) to work with NUnit 2.5.3 on .NET 4.0?

A: 

There might have been some breaking changes in the profiling API. Atleast they had the major addition of the attach/detach API. http://blogs.msdn.com/davbr/ seems to talk about some of them.

So unless you want to change the sourcecode of the tool yourself, I think you might be out of luck.

Cine
A: 

If you're not able to get PartCover working, you could try out this new Code Coverage tool developed by JetBrains :] http://blogs.jetbrains.com/dotnet/2010/03/jetbrains-to-launch-dotcover-eap-next-week/ Integrates nicely in Visual Studio and you can toggle highlites on code that's covered.

Bas
I've got that installed already. It's looking pretty good, but it's still a pre-v1.0 product and it's a bit rough in places. There are also (explicitly) features that won't make the cut for v1.0. Sad to say, some of those are in PartCover...
Roger Lipscombe
On the other hand, I posted this question just before dotCover was released to EAP, so if I can't get PartCover to work, I'll persevere with dotCover.
Roger Lipscombe
Yeah I've also tried PartCover as one of my first Code Coverage tools, but it gave me the feeling that it wasn't fully developed and that it was released to soon. You should ask yourself if you want to put alot of effort in trying to get PartCover working. It's a good alternative in contrary with for example NCover, but imho it lacks important support. Another disadvantage is that there aren't alot of (freeware) code coverage tools available, so I can understand your choice for PartCover.
Bas
+3  A: 

I have recently completed a portcover fork that will hook into the .NET4 CLR - maybe you could give that a try

http://github.com/sawilde/partcover.net4

Shaun Wilde
I just got this running in under 30 minutes flat, thanks Shaun!
CubanX
A: 

I have PartCover and NUnit working properly with VS 2010 and .NET 4.0 on Windows 7 x64.

It was necessary to upgrade to PartCover.NET4 (and recompile it for x86 CPU), and NUnit 2.5.5.

I was originally using NUnit 2.5.4 and could not get it to work with .NET 4.0. I don't know if 2.5.3 works with .NET 4.0. It was also necessary to run the unit tests under nunit-console-x86.exe to force the tests to run in 32 bit, because PartCover only supports 32 bit at this stage because of it's 32 bit COM component.

GiddyUpHorsey