我创建了一个名为“CoverageExcludeAttribute”的自定义属性,并将其放在我想从代码覆盖率分析中排除的类之上。但排除不起作用。覆盖率报告显示测试 dll 的覆盖率以及所有引用的程序集(包括包含排除属性的类)
<UsingTask TaskName="NCoverExplorer.MSBuildTasks.NCover" AssemblyFile="$(Libraries)\NCoverExplorer.MSBuildTasks.dll"/>
<Target Name="NcoverCoverage">
<NCover ToolPath="C:\Program Files\TestDriven.NET 3\NCover\1.5.8"
CommandLineExe="D:\Xunit\xunit.console.exe"
CommandLineArgs="MyTestDll"
WorkingDirectory="MyWorkingDirectory"
excludeAttributes="CoverageExcludeAttribute"
LogFile="coverage.log"
/>
</Target>
我错过了什么吗?
谢谢。