How to exclude Projects with names ending in “.Test” from my code coverage analysis in VS2012 Unit Tests

主宰稳场 提交于 2019-11-30 04:28:57
Grin

There is a connection with the period issue as it was mentioned here. If you change the exclude section to this

<ModulePath>.*tests.dll</ModulePath>
<ModulePath>.*Tests.dll</ModulePath>

or this

<ModulePath>.*\.tests\..*</ModulePath>
<ModulePath>.*\.Tests\..*</ModulePath>

it'll work

You can exclude it by excluding the project dll or by using project name itself also. E.g. -

<ModulePaths>
 <Exclude>
  <ModulePath>Fabrikam.Math.UnitTest.dll</ModulePath>  
    <!-- You can add more ModulePath nodes here. -->
 </Exclude> 
</ModulePaths>

This MSDN link is useful for it.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!