Deserialize Error
-
I have a file that has a serialized object in it. I wrote ANOTHER program that I wanted to read that object. When I attempt to Deserialize I get the following execption: Unable to find assemble 'Address, Version 1.0.0.0, Culture=neutral, PublicKeyToken=null To make sure the second program new about the class object that was stored in the file, I copied the class to the new program. I also copied the Serialize and Deserialize code that works on the first program to the second program. The first program can read and write with no problems to this file. Both programs were created in MS's Visual C# 2005 Express Edition Beta. Anybody have an idea why one program can not read a serialized file created by another program? Thanks for any help, Dave
-
I have a file that has a serialized object in it. I wrote ANOTHER program that I wanted to read that object. When I attempt to Deserialize I get the following execption: Unable to find assemble 'Address, Version 1.0.0.0, Culture=neutral, PublicKeyToken=null To make sure the second program new about the class object that was stored in the file, I copied the class to the new program. I also copied the Serialize and Deserialize code that works on the first program to the second program. The first program can read and write with no problems to this file. Both programs were created in MS's Visual C# 2005 Express Edition Beta. Anybody have an idea why one program can not read a serialized file created by another program? Thanks for any help, Dave
You can't copy a class by coping the source code for it. That will only create a class that looks exactly the same, but it is not the same class. Compile the class by itself, so that you can reference the dll from both programs. --- b { font-weight: normal; }
-
You can't copy a class by coping the source code for it. That will only create a class that looks exactly the same, but it is not the same class. Compile the class by itself, so that you can reference the dll from both programs. --- b { font-weight: normal; }
That still wont work. According to MSDN, a serialized stream will NOT deserialize in any program except the one that serialized it. Maybe of your new program has the same assembly name and such it may work. I searched for days for this answer until I came scross that on MSDN.