7

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?

Community
  • 1
  • 1
Roger Lipscombe
  • 89,048
  • 55
  • 235
  • 380

6 Answers6

6

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
  • 8,228
  • 4
  • 36
  • 56
1

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
  • 1,232
  • 1
  • 12
  • 26
  • 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 Apr 14 '10 at 18:38
  • 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 Apr 14 '10 at 18:39
  • 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 Apr 15 '10 at 09:47
1

I also had some problems with running PartCover 2.3 on .NET Framework 4. Didn't want to use PartCover.NET4 as it seems that the browser have a bug which makes the coverage not appear in code view window.

Fortunately looks like guys from Sharpdevelop managed to do the job. In Sharpdevelop 4.0 PartCover 2.3.0 works out of the box with .NET 4 and NUnit 2.5.8.

trecio
  • 11
  • 1
1

You can find detailed steps about using PartCover 4.0 with Gallio on 64bit Windows 2008 Server at

http://sapawar.blogspot.com/2011/03/using-partcover-4x-to-find-code.html

Thanks Sachin

0

There might have been some breaking changes in the profiling API. Atleast they had the major addition of the attach/detach API. David Broman's CLR Profiling API Blog 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.

valiano
  • 16,433
  • 7
  • 64
  • 79
Cine
  • 4,255
  • 26
  • 46
0

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.

John Mills
  • 10,020
  • 12
  • 74
  • 121