Excluding assemblies from coverage

Excluding assemblies from coverage

Hi NCover,

I have attempted to exclude assemblies from coverage, but they are still included. As they contain my unit tests they are 100% covered and they just affect my overall coverage with a false positive contribution - and make my coverage report longer and harder to read.

Example: Rap1D.EventHandling.Tests is included in report though Rap1D.EventHandling.Tests.dll is listed under ExcludeAssemblies.

I'm calling NCover through CC.Net & msbuild.

Can you point me in the right direction?

Thanks,

Anders, Denmark

MSBuild call in my cc.net project file:

  <msbuild
    executable = "C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe"
    workingDirectory = "$(WorkingDir)\src"
    projectFile="BuildScript17.proj"
    buildArgs = "/p:Configuration=Debug /p:vsproject=rap1d.sln"
    targets = "Clean;Build;CoverMyCode;CreateCoverageReports"
    timeout = "900"
    logger = "C:\Program Files\CruiseControl.NET\server\ThoughtWorks.CruiseControl.MsBuild.dll"
      />

msbuild file (BuildScript17.proj):

...

...


RE: Excluding assemblies from coverage

Hi Anders,

Thanks for posting.

Below is a link to the exclusion syntax page, but the relevant part is that in excluding assemblies, the assembly name should not include the filename extension.

http://docs.ncover.com/ref/3-0/ncover-console/command-line/profiling-options#eas

Hope this helps!

NCover Support