|Home||Back to Index|
I recently blogged on Suppressing FxCop warnings for generated code. A coworker (Eric) forwarded this article on the correct usage of those attributes. I spent several hours today updating our CodeSmith templates to conform to Microsoft’s recommendations.
The recommendations make sense. When you generate a partial class, you don’t want to place the GeneratedCodeAttribute at the type level. That would suppress FxCop messages on developer code in other portions of the class.
What annoys me is the team whining about developers inside and outside Microsoft violating these recommendations. If they had bothered to put this information in the FxCop documentation and/or the attribute help, some of these problems might have been avoided.