I\'m getting an:
System.Runtime.Serialization.SerializationException: Unable to find assembly \'myNameSpace, Version=1.0.0.0, Culture=neutral, Pub
I ran into a similar problem and I got it working with help of the following link: BinaryFormatterDeserialize-not-finding-a-type
Basically what you need to do is subscribe to the AssemblyResolve event BEFORE deserializing. Then unsubscribe after deserialization..
AppDomain.CurrentDomain.AssemblyResolve +=
new ResolveEventHandler(CurrentDomain_AssemblyResolve);
// CODE TO DESERIALIZE HERE
AppDomain.CurrentDomain.AssemblyResolve -= new ResolveEventHandler(CurrentDomain_AssemblyResolve);
Here the method I used to resolve the Assembly:
static Assembly CurrentDomain_AssemblyResolve(object sender, ResolveEventArgs args)
{
try
{
if(args.Name == "MY ASSEMBLY NAME"))
{
//Load my Assembly
Assembly assem = Assembly.LoadFrom("MY ASSEMBLY PATH");
if(assem != null)
return assem;
}
}
catch { ;}
return Assembly.GetExecutingAssembly();
}