Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Deserialize Error

Deserialize Error

Scheduled Pinned Locked Moved C#
helpcsharpbeta-testingquestionannouncement
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    dicas
    wrote on last edited by
    #1

    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

    G 1 Reply Last reply
    0
    • D dicas

      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

      G Offline
      G Offline
      Guffa
      wrote on last edited by
      #2

      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; }

      D 1 Reply Last reply
      0
      • G Guffa

        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; }

        D Offline
        D Offline
        Daniel1324
        wrote on last edited by
        #3

        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.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups