See http://blogs.msdn.com/b/codeanalysis/archive/2007/04/27/correct-usage-of-the-compilergeneratedattribute-and-the-generatedcodeattribute.aspx for how it should be done.
Patch coming.. :-)
Patch coming.. :-)