测试显示在“外部"下按项目分组时测试资源管理器中的类别 [英] Test are being shown under "External" category in Test Explorer when Grouped By Project

查看:26
本文介绍了测试显示在“外部"下按项目分组时测试资源管理器中的类别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

每当我尝试在 Visual Studio 2012 的测试资源管理器上运行测试时,一些测试被归类为外部",即使分组方式设置为按项目分组"

Whenever I try to run tests on Test Explorer from Visual Studio 2012, SOME test are being categorized as "External", even though the Group By is set as "Group By Project"

那么源代码无法识别

推荐答案

这是由于 pdb 文件未包含在编译中.如果您在调试以外的解决方案配置中进行编译,则必须确保包含 pdb.

This is due the pdb file is not included in the compilation. If you're compiling in a solution configuration other than debug you must ensure that pdb is included.

要实现这一点,您必须打开高级构建设置:

To achieve that you must open the advanced build setting:

  • 右键单击项目并选择属性
  • 点击构建标签
  • 检查是否在配置"下拉列表中选择了您的配置
  • 点击高级按钮.

在新窗口中,您必须在调试信息下拉菜单中选择pdb-only".

In the new window you must select "pdb-only" in the debug info dropdown.

这篇关于测试显示在“外部"下按项目分组时测试资源管理器中的类别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆