In my Codegeneration-Addin for Visual Studio 2008 i tried to add an attribute to my generated getter and setter with the method "AddAttribute"

C#:
  1. CodeFunction getter = prop.Getter;
  2.   getter.Attributes("MyAttribute", "myValue", -1);

At runtime I get an error with the nice message "Unbekannter Fehler" (unknown Error). It seems that the error only appears at getter/setter (CodeFunction). At "CodeProperty" and "CodeClass" everything works fine. Strange.