I have situations where I may have a type reference in the object graph that is no longer available because it has been depricated. These are objects defined outside the control of my serialization API. I need the deserializer
to just ignore these objects and move on without erroring out with:
"Unable to find assembly 'MyMissingAssembly, Version=22.214.171.124, Culture=neutral, PublicKeyToken=null'."
My question is not why the error is occuring. I understand why. But how do I handle this error gracefully, have the missing types skipped, and continue deserializing the rest of the object graph?
I have experimented returning a dummy class through the VersionDeserializationBinder.BindToType() method so that I can do type substitution with types I control. This works but I need a way to discriminate for which types I should do
this for. So I need to know if the deserializer has access to the type in question before it attemts to deserialize the object. If only it could tell me it can't find it before it throws the error.
View Complete Post