U
Udi
Hi,
I'm having problems deserializing my class using SoapFormatter.
I have a process that dynamically loads an assembly ‘A’.
Assembly ‘A’ in turn implicitly loads assembly ‘B’ that contains the
serialzed class and the deserialization code (see below).
However, in case assembly ‘B’ is located in a folder different than
the process’s current working directory
I get the following exception:
“Parse Error, no assembly associated with Xml key a1:http://
schemas.microsoft.com/clr/nsassem/….”
When moving assembly ‘B’ to the process current directory, everything
works fine.
Does anyone know what is the cause of this problem and how can I get
over it?
Thanks,
Udi
[Serializable]
public class ChipLabProps
{
:
:
}
public ChipLabProps LoadProps()
{
using (FileStream fileStream = new FileStream(propFileName,
FileMode.OpenOrCreate, FileAccess.Read))
{
IFormatter formatter = new SoapFormatter();
return (ChipLabProps)formatter.Deserialize(fileStream);
}
}
I'm having problems deserializing my class using SoapFormatter.
I have a process that dynamically loads an assembly ‘A’.
Assembly ‘A’ in turn implicitly loads assembly ‘B’ that contains the
serialzed class and the deserialization code (see below).
However, in case assembly ‘B’ is located in a folder different than
the process’s current working directory
I get the following exception:
“Parse Error, no assembly associated with Xml key a1:http://
schemas.microsoft.com/clr/nsassem/….”
When moving assembly ‘B’ to the process current directory, everything
works fine.
Does anyone know what is the cause of this problem and how can I get
over it?
Thanks,
Udi
[Serializable]
public class ChipLabProps
{
:
:
}
public ChipLabProps LoadProps()
{
using (FileStream fileStream = new FileStream(propFileName,
FileMode.OpenOrCreate, FileAccess.Read))
{
IFormatter formatter = new SoapFormatter();
return (ChipLabProps)formatter.Deserialize(fileStream);
}
}