Tech Off Thread

4 posts

Forum Read Only

This forum has been made read only by the site admins. No new threads or comments can be added.

Binary Serialization problem

Back to Forum: Tech Off
  • User profile image
    Blue Ink

    Hello,
    I was asked to revamp an application with VS2005. For some reason the original app (written with .NET 1.0), stores an ArrayList of ArrayLists of Image objects via binary serialization. (Don't shoot, it wasn't me!)
    I must keep producing exactly the same files as these will be consumed by other apps I cannot change.
    What I found seems to indicate that this is simply impossible out of the box, and I would be willing to write the file myself if this is the only way to go... yet I couldn't even find a detailed explaination about how the binary serialization works.
    Any clue?

    Thanks in advance
    --m

  • User profile image
    conradj

    Why don't you break out the old .NET 1.1 code that handles the serialization/deserialization into a class library project, build it, and add a reference to the DLL in your .NET 2.0 code? That way, you can simply re-use the working bits and keep going with your new effort in 2.0.

    -Conrad

  • User profile image
    Blue Ink

    Well, probably I'm being silly, but the original app was written with .NET 1.0 and I'd rather not have that around on my machine.

    Similarly, if I'm not mistaken, the clients would then have to install both the versions of .NET which would be rather uncomfortable and is going to get more than one eyebrow to lift.

    I'd go to great lengths just to keep the solution "straight 2.0". Anyway thanks for the advice.

    --m

     

  • User profile image
    NuTcAsE

    Blue Ink wrote:

    Well, probably I'm being silly, but the original app was written with .NET 1.0 and I'd rather not have that around on my machine.

    Similarly, if I'm not mistaken, the clients would then have to install both the versions of .NET which would be rather uncomfortable and is going to get more than one eyebrow to lift.

    I'd go to great lengths just to keep the solution "straight 2.0". Anyway thanks for the advice.

    --m

     



    Actually thats not correct. When you load an application with the .Net 2.0 runtime, and it uses a library that was built using 1.1, it will still execute that library using 2.0. A process can have only one version of the runtime loaded, both 2.0 and 1.1 cannot be loaded into the same process.

    So it would be safe to wrap the serialization functionality into a seperate library and use that from your application and still only have to deploy 2.0 version on client machines.

    - R

Conversation locked

This conversation has been locked by the site admins. No new comments can be made.