Assembly Missing error when loading serialized object

  • Thread starter Thread starter Daniel Reber
  • Start date Start date
D

Daniel Reber

I have an exe that serializes one of it's classes to disk. I also have the
exact same .cs file that contains the class that was serialized, in a
Windows service application. I am trying to load that file every time the
service starts. When I try to load it I get this error

File or assembly name PXPJobSetup, or one of its dependencies was not found.

I am not sure what I need to do.

Thanks

Dan Reber
 
Make sure that you're referencing the assembly where the class of the
serialized object is defined.
It is not enough to just have that class redefined in your deserializing
project.
 
Thanks for your help. I changed the one project to a Class Library and it
works fine.
By the way, what do you mean by "referencing the assembly"

Dan
 
Just what you did - you moved your "serializeable" class into a separate
assembly (class library) and now, I guess, both the exe app and the service
are referencing that class library...
 
That's correct, thanks for your help.

Dan

Val Savvateev said:
Just what you did - you moved your "serializeable" class into a separate
assembly (class library) and now, I guess, both the exe app and the service
are referencing that class library...
 
Back
Top