Exclude Generated Code

Exclude Generated Code

There's a feature called "Auto Exclusion of Compiler-Generated Code" and there is also "CoverageExclude" parameter to specify attributes for types that should be ignored. Unfortunately I get a full coverage report of every XY.Designer.cs including resources, linq-databases etc. They have a) a "CompilerGenerated" attribute and b) I specified "/ea GeneratedCodeAttribute" when calling the ncover.console but ncover doesn't seem to care.Shouldn't this type of code be excluded automatically? And if not, shouldn't the /ea paramter have it excluded? I'm using ncover 2.1.0 by the way.


RE: Exclude Generated Code

The "Auto Exclusion of Compiler-Generated Code" applies to symbols that the compiler creates to help w/ debugging, it does not apply to the "CompilerGenerated" attribute. As well, the //ea parameter does work, you just need to specify the fully qualified name of the attribute (i.e. namespace.GeneratedCodeAttribute)


RE: Exclude Generated Code

Yes, that did it! Great, thanks.