Deserialization Issue
-
Hello Guys, I have an issue with Deserialization. I have 2 Projects and I want to extport data to a binary file (serialize) in the first Project, and i want to read that date using the second application Deserialize. The first Aplication will be given to hte end user, and will generate a Binary file that i want to read using the Admin application (the second one). When i try to deserialize i receive this error: "Unable to find assembly 'Application Timing', Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'." I think i know the cause of the issue. The binary formatter puts the Application name,version and info in the file when it serilizes it, but i don't know how to bypass this. Any suggestions?:confused: Kind regards, Alex
“Be the change you want to see in the world.”
-
Hello Guys, I have an issue with Deserialization. I have 2 Projects and I want to extport data to a binary file (serialize) in the first Project, and i want to read that date using the second application Deserialize. The first Aplication will be given to hte end user, and will generate a Binary file that i want to read using the Admin application (the second one). When i try to deserialize i receive this error: "Unable to find assembly 'Application Timing', Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'." I think i know the cause of the issue. The binary formatter puts the Application name,version and info in the file when it serilizes it, but i don't know how to bypass this. Any suggestions?:confused: Kind regards, Alex
“Be the change you want to see in the world.”
There are two options: 1. Put the class definition in a separate assembly and deploy it in both applications 2. Use SerializationBinder. Here is an example: Draw with Mouse[^]
Giorgi Dalakishvili #region signature My Articles Asynchronous Registry Notification Using Strongly-typed WMI Classes in .NET [^] My blog #endregion