T
Tamir Khason
Hi, all
Two classes Foo1 and Foo2
Foo1 uses Foo2 as reference
Both are strong name signed with the same key pair
I'm performing Binary Serialization of object inside Foo2 from Foo1
as following:
------------------------------
IFormatter f = new BinaryFormatter();
Stream s = new FileStream(fileName,FileMode.Create,FileAccess.Write,
FileShare.None);
f.Serialize(s,graph);
s.Close();
----------------------------
and then Deserialize:
----------------------------
IFormatter f = new BinaryFormatter();
Stream s = new FileStream(fileName, FileMode.Open, FileAccess.Read,
FileShare.Read);
graph = f.Deserialize(s);
s.Close();
----------------------------
everythink working just fine, BUT
Making any change in Foo1 or Foo2 (recompilation) [WITHOUT MAKING ANY
CHANGES IN THE OBJECT FOR DE/SERIALIZATION] cause the following exception
throw and make the saved object undeserializable thus I can not read the
object from saved file anymore
System.Runtime.Serialization.SerializationException: Cannot find the
assembly Foo2, Version=1.0.1739.20447, Culture=neutral,
PublicKeyToken=8f3506f185b212ea.
Except it everythink working fine that means that Foo1 can find and use Foo2
Please advice
Two classes Foo1 and Foo2
Foo1 uses Foo2 as reference
Both are strong name signed with the same key pair
I'm performing Binary Serialization of object inside Foo2 from Foo1
as following:
------------------------------
IFormatter f = new BinaryFormatter();
Stream s = new FileStream(fileName,FileMode.Create,FileAccess.Write,
FileShare.None);
f.Serialize(s,graph);
s.Close();
----------------------------
and then Deserialize:
----------------------------
IFormatter f = new BinaryFormatter();
Stream s = new FileStream(fileName, FileMode.Open, FileAccess.Read,
FileShare.Read);
graph = f.Deserialize(s);
s.Close();
----------------------------
everythink working just fine, BUT
Making any change in Foo1 or Foo2 (recompilation) [WITHOUT MAKING ANY
CHANGES IN THE OBJECT FOR DE/SERIALIZATION] cause the following exception
throw and make the saved object undeserializable thus I can not read the
object from saved file anymore
System.Runtime.Serialization.SerializationException: Cannot find the
assembly Foo2, Version=1.0.1739.20447, Culture=neutral,
PublicKeyToken=8f3506f185b212ea.
Except it everythink working fine that means that Foo1 can find and use Foo2
Please advice