I've got some winforms partial classes marked [Obsolete]. Unlike when applying this to methods, I get no warning after building. Is this because it's set on a partial class? I can't set it in the designer too, because that code can/will be regenerated. Anything I can do about it with attributes? I don't want to throw an exception or something similar.
I would do a little re-design there. Whilst const ought to be flagged by Obsolete, I would redesign and make a public property that returns your const. Mark the property as obsolete and it should flag it.