I have a class in my code that I don't want showing up in code coverage numbers. I added the [ExcludeFromCodeCoverage] attribute to the class definition like this:

[ExcludeFromCodeCoverage]
public class MyClass { ... }

According to the docs (http://msdn.microsoft.com/en-us/library/system.diagnostics.codeanalysis.excludefromcodecoverageattribute.aspx) this should be all I need, but the class still shows up in code coverage analysis.

I'm using VS2012/.NET 4.5 if that matters.

Any ideas why this wouldn't work?

Edit
Report