「CoverageExcludeAttribute」というカスタム属性を作成し、コード カバレッジ分析から除外したいクラスの上に配置しました。しかし、除外は機能しません。カバレッジ レポートには、参照されているすべてのアセンブリ (除外属性を含むクラスを含む) と共に Test 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>
何か不足していますか?
ありがとう。