views:

31

answers:

2

In one of the user controls in our project we have an obsolete property looking like :

 [Browsable ( false )]
 [Obsolete ( "Not currently supported on this control" )]
 public bool DeferPropertyValueUpdates

Every time I edit a form that contains this control, Visual Studio will put this property into the .designer file.

This then causes a warning to be generated, which makes my boss throw things at me.

How can I stop Visual Studio from putting this property in?

+3  A: 

I believe a

    [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]

attribute is what you're looking for.

Groky
Thanks for the response. I am only accepting the other guys response because he needs rep more than you (slightly)! ;-)
Mongus Pong
+2  A: 

this is what you need

[Browsable(false), DesignerSerializationVisibility(
                            DesignerSerializationVisibility.Hidden)]
Saar