Build Issues and Build Type

My application creates a new Foo type and writes it to a new assembly. Then I create an object of type Foo and serialize it. If I delete the assembly and recreate it when I try to deserialize the Foo object, it tells me that it cannot convert the Foo type to the Foo type. He believes that these are different types. Is there any way to fix this?

EDIT: I do not control serialization.
EDIT: We found that the guid version is always different. What is this manual and how can we indicate it?

+3
source share
3 answers

, id (MVID) . , MVID. . MVID. . dll, MVID . , MVID , .

+2

XML . BinaryFormatter , , ( , IL). , ( ), , , , AppDomain, AppDomain, , .

+2

BinaryFormatter, ? . ; XmlSerializer, DataContractSerializer, protobuf-net, JavaScriptSerializer ..

In addition, you will have to handle the AppDomain.AssemblyLoad event and / or provide a custom binder; a lot of work.

+1
source

All Articles