S
Sin Jeong-hun
Hi.
There are a server and a client, and I need to exchange "Message"
objects between them. The class Message included in both applications
has the exact signature (namespace, all fields, methods, etc. In fact,
I copied the same file into both projects) But serialzing from one
side and deserializing on the other side causes assembly not found
exception. I've searched the internet and found some article that said
I need to implement ISerializable to work around, but after trying
that, I think that might only work on the same application
(assembly).
What should I do? I know the easiest solution to this is to move the
class "Message" into a separate assembly and refer to it in both
applications (server and client), but is this the only way? The
Message classes in the two applications are exactly the same (again,
copy and paste) , can't I somehow convert the deserialized object into
Message object, by force? I would like to hear how you deal with this
kind of situation, because I think probably many people already have
encountered with this problem before. Thank you.
There are a server and a client, and I need to exchange "Message"
objects between them. The class Message included in both applications
has the exact signature (namespace, all fields, methods, etc. In fact,
I copied the same file into both projects) But serialzing from one
side and deserializing on the other side causes assembly not found
exception. I've searched the internet and found some article that said
I need to implement ISerializable to work around, but after trying
that, I think that might only work on the same application
(assembly).
What should I do? I know the easiest solution to this is to move the
class "Message" into a separate assembly and refer to it in both
applications (server and client), but is this the only way? The
Message classes in the two applications are exactly the same (again,
copy and paste) , can't I somehow convert the deserialized object into
Message object, by force? I would like to hear how you deal with this
kind of situation, because I think probably many people already have
encountered with this problem before. Thank you.