为什么我在 Visual Studio 2010 中得不到 C/CLI 项目的代码覆盖率结果?

发布于 2024-09-02 02:39:57 字数 285 浏览 3 评论 0原文

我最近将我的解决方案升级到 Visual Studio 2010。

我有 4 个项目想要使用单元测试进行覆盖 - 3 个 C# 和 1 个 C++/CLI。

我了解了 C# 项目的情况,但没有了解 C++/CLI 项目的情况。

我确实在 Visual Studio 2008 中获得了所有这些内容。

我已经使用 testrunco​​nfig -> 配置了程序集。数据和诊断 ->代码覆盖率->配置。

为什么我没有获得 C++/CLI 项目的代码覆盖率结果?

I've recently upgrade my solution to Visual Studio 2010.

I have 4 projects I want to cover using unit tests - 3 C# and 1 C++/CLI.

I get coverage for the C# projects but not for the C++/CLI project.

I did get for all of them in Visual Studio 2008.

I've configured the assemblies using testrunconfig -> Data and Diagnostics -> Code Coverage -> Configure.

Why don't I get code coverage result for the C++/CLI project?

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

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

发布评论

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

评论(1

二智少女猫性小仙女 2024-09-09 02:39:57

我已经发现出了什么问题。

从 Visual Studio 2008 升级到 Visual Studio 2010 似乎删除了配置文件选项 (/PROFILE)。

需要做的是转到

Project Properties -> >配置属性->链接器->高级->配置文件

并将此设置更改为“是”(/PROFILE)。

现在我获得了 C++/CLI 项目的代码覆盖率。

I've found out what was wrong.

It appears that the upgrade from Visual Studio 2008 to Visual Studio 2010 removed the profile option (/PROFILE).

What was needed to be done was to go to

Project Properties -> Configuration Properties -> Linker -> Advanced -> Profile

and change this settings to Yes (/PROFILE).

Now I get code coverage for the C++/CLI project.

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