For various reasons I moved a class (MovedClass) from assamblyA to assamblyB and also changed the namespace it was in. Everything else stayed the same.
But now I have a problem reading the Data I serealized before moving the class
The exception says:
What can I do? Its essential for me to move the Classes to the new assamby. Is there any way to tell desearialize that the class has moved?
But now I have a problem reading the Data I serealized before moving the class
C#:
BinaryFormatter formatter = new BinaryFormatter();
StayedClass Stayed = null;
Stayed= (StayedClass)formatter.Deserialize(stream);
C#:
public StayedClass(SerializationInfo info, StreamingContext ctxt)
{
Moved = (MovedClass)info.GetValue("WebInfo", typeof(MovedClass)); // here it throws a exception
}
The exception says:
C#:
Ein Objekt muss IConvertible implementieren.
which is german for:
Object must implement IConvertible
What can I do? Its essential for me to move the Classes to the new assamby. Is there any way to tell desearialize that the class has moved?