Reputation: 1172
Is anyone aware of any attribute (analogous to [Obsolete]) or similar mechanism to ask the compiler to raise a warning if a particular class is referenced (at design-time) by other projects? Note I cannot make it 'internal' because I'm databinding to System.* (or 3rd-party) controls so they have to be public.
Note I use [Obsolete] as an analogy, the class is not obsolete. I just want compiler warnings for out-of-project design-time references.
Upvotes: 2
Views: 110
Reputation: 18965
Based on the answer to this question, it looks like it would be doable using PostSharp. Here is a link from the answer that describes some detail which might help.
Upvotes: 1
Reputation: 1172
This is the closest thing I could find -- http://msdn.microsoft.com/en-us/library/system.runtime.compilerservices.internalsvisibletoattribute.aspx
Upvotes: 0