I created a custom attribute called "CoverageExcludeAttribute", and placed it above the classes which I want to exclude from my code coverage analysis. But the exclusions doesn't work. The coverage report shows coverage for the Test dll along with all the referenced assemblies (which includes classes containing the exclusion attribute)
<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>
Am I missing something?
Thanks.