Phill,
I've been pondering an answer for a few days now...
The "Best" I can come up with is to decouple the relationship between the
classes. Either completely severe the relationship & let the versioning of
the GAC take care of current code. Or replace the relationship with an
interface that only has an Obsolete(false) attribute on it or an internal
interface, which would probably break existing code. Alternatively put
Obsolete(True) on each member of both types, except for the referring
members themselves.
Remember assemblies in the GAC can be (should be) versioned. I would expect
"Deleting" these two types to be the moral equivalent to a new version,
hence I would introduce a new version in the GAC, as opposed to simply
replacing an existing version.
--
Hope this helps
Jay B. Harlow [MVP - Outlook]
..NET Application Architect, Enthusiast, & Evangelist
T.S. Bradley -
http://www.tsbradley.net
"Phill W." <p-.-a-.-w-a-r-d@o-p-e-n-.-a-c-.-u-k> wrote in message
news:e2*********@yarrow.open.ac.uk...
| If I have a reusbale (GAC-'registered') assembly that contains two,
| [cross-]related classes (imagine a DataSet and DataTable; the former
| contains instances of the latter, the latter has a reference to its
| parent .. er .. former).
|
| I want to make /both/ of these classes Obsolete, so I added Obsolete
| attributes to both. When these are only Warnings ...
|
| <Obsolete("DO NOT USE", False)>
|
| ... all is well; I can compile my assembly and get Warnings if I try to
| compile other code against them.
|
| My problem, though, is that I want to make these Errors, so that people
| really /really/ can't compile against them. So, I up-ed the Obsolete
| attribute to be an error ...
|
| <Obsolete("NO, REALLY - DO NOT USE", True)>
|
| ... but now I can't compile *my* assembly, because the Obsolete classes
| refer to one another!
|
| Is there any way of doing this?
| An "IgnoreObsoleteAttributeOn(System.Type)" attribute, perhaps?
|
| TIA,
| Phill W.
|
|
| oone is parent