Question

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?

Was it helpful?

Solution

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

OTHER TIPS

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.

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.

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

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.

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top