VS2010 中仪器组件的用途是什么?
在Visual Studio 2010下测试设置<<数据和诊断选项卡 <代码覆盖率配置,当您选择要应用代码覆盖率分析的程序集时,您可以选择是否就地检测程序集。
默认情况下,会检查到位的仪器组件,但是当我运行单元测试时检查它时,我会被告知没有生成代码覆盖 xml 文件。如果我选择不将仪器组装到位,则它可以正常工作。
什么给?
In visual studio 2010 under the test settings < data and diagnostics tab < configuration for Code Coverage you can choose whether to instrument assemblies in place when you select which assemblies you wish to apply code coverage analysis to.
By default instrument assemblies in place is checked, however when it is checked anytime I run my unit tests I will be told there is no code coverage xml file being generated. If I choose to not instrument assemblies in place it works fine.
What gives?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这些选项之间的基本区别如下:
您是否有任何可以移动二进制文件的构建后脚本?根据项目引用、测试部署项和构建脚本,在“就地”情况下,VS 可能会检测运行单元测试时实际上并未部署的二进制文件。
The basic difference between the options is this:
Do you have any post-build scripts that move binaries around? Depending on project references, test deployment items, and build scripts, it could be that in the "in place" case, VS is instrumenting binaries that aren't actually being deployed when your unit tests are run.