.NET's Deserilization errors are quite generic, for example something like this:
System.ArgumentException: Object of type 'System.Uri' cannot be converted to type 'System.String'.
It's clear that we changed the type of a property in an object but there are like 10-15 different classes in this serialized object, so it's really hard to figure out which one we changed or which commit messed this up.
Is there anyway to get information about which property in which class (or at least in which class) actually causing this error? Is there any external tool or known ways to do this?
P.S. Before anyone start telling me why I shouldn't use binary serializer or why I should X,Y instead etc. for backward compatibility, please save the advice on those. I'm aware of all those but that's not the question.
If you enable debugging into framework code (see this link) and then press ctrl + shift + e and select all managed code exceptions the error will appear in the actual source line that fails. You should be able to use the stack trace then to find out what part of the object it was trying to deserialize at that point.
It's not easy, but that's how we ended up doing it.