Using PartCover 2.3 with .NET 4.0 runtime?

心已入冬 提交于 2019-12-07 00:53:54

问题


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?


回答1:


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




回答2:


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.




回答3:


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.




回答4:


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




回答5:


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.




回答6:


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.



来源:https://stackoverflow.com/questions/2546340/using-partcover-2-3-with-net-4-0-runtime

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!