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. Serializing objects.

Serializing objects.

Scheduled Pinned Locked Moved C#
question
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.
  • K Offline
    K Offline
    kalla
    wrote on last edited by
    #1

    I have serialized an object from a project(lets name it x). When i deserialize it from the same project,i am able to recover my object.However, when i try to deserilize that object when i am working in another project, i get an exception " Assembly or file X missing " ?? Could someone tell me why?? Thanks.

    R 1 Reply Last reply
    0
    • K kalla

      I have serialized an object from a project(lets name it x). When i deserialize it from the same project,i am able to recover my object.However, when i try to deserilize that object when i am working in another project, i get an exception " Assembly or file X missing " ?? Could someone tell me why?? Thanks.

      R Offline
      R Offline
      rak
      wrote on last edited by
      #2

      when you serialize an object some information about the object is also saved. This includes the assembly to which the class belongs, the version, culture, the namespace etc. This information is required to recreate the class. In your case the serializing is done in one assembly & deserializing in another assembly. The type information doesnt match. One work around is to keep the class you want to serialize in a common assembly. and reference this asssembly in your other projects. HTH Rak

      K 1 Reply Last reply
      0
      • R rak

        when you serialize an object some information about the object is also saved. This includes the assembly to which the class belongs, the version, culture, the namespace etc. This information is required to recreate the class. In your case the serializing is done in one assembly & deserializing in another assembly. The type information doesnt match. One work around is to keep the class you want to serialize in a common assembly. and reference this asssembly in your other projects. HTH Rak

        K Offline
        K Offline
        kalla123
        wrote on last edited by
        #3

        Thanks a lot. That was helpful.:)

        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