将 PartCover 2.3 与 .NET 4.0 运行时结合使用?

发布于 2024-08-27 20:03:54 字数 544 浏览 10 评论 0原文

我已经成功地将 PartCover 2.3 与 VS 2008 在我的 64 位上配合使用机器

我现在正在尝试让它与 VS 2010 和 NUnit 2.5.3 一起工作。我有 NUnit 使用正确的 CLR 版本,但我不能让 PartCover 产生任何输出。我得到的只是一个“空”报告 XML 文件:

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

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

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(6

や莫失莫忘 2024-09-03 20:03:54

我最近完成了一个 portcover 分支,它将连接到 .NET4 CLR - 也许你可以尝试一下

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

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

缪败 2024-09-03 20:03:54

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.

染墨丶若流云 2024-09-03 20:03:54

我在 .NET Framework 4 上运行 PartCover 2.3 时也遇到了一些问题。不想使用 PartCover.NET4,因为浏览器似乎有一个错误,导致覆盖范围不会出现在代码视图窗口中。

幸运的是,Sharpdevelop 的人似乎成功地完成了这项工作。在 Sharpdevelop 4.0 中,PartCover 2.3.0 可以与 .NET 4 和 NUnit 2.5.8 一起使用。

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.

梅倚清风 2024-09-03 20:03:54

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

小镇女孩 2024-09-03 20:03:54

我的 PartCover 和 NUnit 在 Windows 7 x64 上可以与 VS 2010 和 .NET 4.0 正常工作。

有必要升级到 PartCover.NET4(并针对 x86 CPU 重新编译)和 NUnit 2.5.5。

我最初使用的是 NUnit 2.5.4,但无法使其与 .NET 4.0 一起使用。我不知道 2.5.3 是否适用于 .NET 4.0。还需要在 nunit-console-x86.exe 下运行单元测试以强制测试在 32 位中运行,因为 PartCover 在此阶段仅支持 32 位,因为它是 32 位 COM 组件。

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.

桃扇骨 2024-09-03 20:03:54

分析 API 中可能存在一些重大更改。至少他们主要添加了附加/分离 API。 David Broman 的 CLR 分析 API 博客似乎在谈论其中的一些。

因此,除非您想自己更改该工具的源代码,否则我认为您可能会运气不好。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文