refence组件的代码覆盖范围 [英] Code coverage for refence assemblies

查看:86
本文介绍了refence组件的代码覆盖范围的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,


有没有办法获取参考程序集的代码覆盖率,特别是System.dll?我试图下载pdb文件并以正常方式添加它,但仍然得到"请确保二进制文件和符号文件都可访问"
错误。我的项目能够获得System.dll的代码覆盖是非常重要的,所以提前谢谢你。


作为参考,我使用VS2017 Enterprise,虽然修复VS2010也就足够了。

解决方案

嗨enjhnsn2,


欢迎来到MSDN论坛。


>>
有没有办法获得参考组件的代码覆盖率,规范如果是System.dll?


是的,你可以

自定义代码覆盖率分析


请使用.runsettings文件自定义代码覆盖率行为,在< ModulePaths>< Include> ...< / Include>< /下添加相应的汇编文件
路径.runsetting文件中的ModulePaths>
节点,然后在
测试菜单上使用它,选择测试设置选择测试设置 file。


>>
我试图下载pdb文件并以正常方式添加它,但仍然得到"请确保二进制文件和符号文件都可访问"错误。


如果要包含不属于解决方案的程序集,请获取
程序集的.pdb文件,并将它们复制到与程序集.dll文件相同的文件夹中。


此外,请查看"。pdb
(符号)文件不可用
"在此链接中。


问候,


Judyzh


Hello,

Is there a way to go about getting code coverage for reference assemblies, specifically System.dll? I have attempted to download the pdb file and add it the normal way, but still get "Please ensure both the binary and the symbols file are accessible" error. It is fairly important for my project to be able to get code coverage of System.dll, so thank you in advance.

For reference, I am using VS2017 Enterprise, although a fix for VS2010 would also be sufficient.

解决方案

Hi enjhnsn2,

Welcome to the MSDN forum.

>> Is there a way to go about getting code coverage for reference assemblies, specifically System.dll?

Yes, you could customizing code coverage analysis.

Please customize the code coverage behavior with the .runsettings file, add the corresponding assembly file path under <ModulePaths><Include>…</Include></ModulePaths> node in .runsetting file , then, use it on the Test menu, choose Test Settings, Select Test Settings file.

>> I have attempted to download the pdb file and add it the normal way, but still get "Please ensure both the binary and the symbols file are accessible" error.

If you want to include assemblies that are not part of your solution, please obtain the .pdb files for the assemblies and copy them into the same folder as the assembly .dll files.

In addition, please have a look at the content of ".pdb (symbol) files are unavailable" in this link.

Regards,

Judyzh


这篇关于refence组件的代码覆盖范围的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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