Serialize with dll is not is same folder as exe

  • Thread starter Thread starter john
  • Start date Start date
J

john

I'm having a serialization problem. I have a dll, and one
of its classes can get serialized. but the dll and the
calling exe dont reside in the same folder or subfolder.

so serialization works fine and a file can be saved to the
hard drive. but deserialization blows chunks, because the
exe is looking in its own folder, or one of its sub
folders, for the dll, and the dll is in a totally seperate
folder.

is there a way to get this to work?
THnaks
 
John,

Where the DLLs reside should have no effect on serialization. I think
that what is happening is that you are saving to a file, and then that file
location is relative to the assembly location. Is this the case?
Serialization doesn't care what it is being serialized to (it is always a
stream). All the serialization framework needs to know is the stream to
read/write from/to and the type(s) it is trying to serialize/deserialize.

Hope this helps.
 
Back
Top