I just ran into an issue with code coverage and generated code from the Visual Studio 2008 dataset designer.  Basically, all the code in the designer.cs is included in the coverage reports instead of being excluded as expected (see the image below), and yet all of the properties are marked with the DebuggerNonUserCode attribute (see my previous post on the subject).

image

After a little hunting around, I ran across this workaround on the Connect site - http://connect.microsoft.com/VisualStudio/feedback/Workaround.aspx?FeedbackID=338895

Here eradicator1 indicates that you need the DebuggerNonUserCode attribute applied to the setter and getter parts of the property declaration instead of just at the property level.  Here's the same code, with the attribute applied to just the Count property getter.

image 

What a pain in the neck.  To make it worse, being generated code, any changes you make are likely to get silently trashed at some point in the future. :-(

Hopefully this will be fixed in VS2008 SP1, but I haven't seen anything indication at this stage that it will be.