Recently, we moved a part of our code to different project library.
Unfortunately, it appears that those data have been serialized into the database with a BinaryFormatter
(don't ask me why, I don't know and I hate this idea).
Now I'm responsible to create an update tool that update the database(The tool is launched automatically by our software when it detects a database that need updates, based on version):
- Create new columns
- Deserialize the binary column
- Write the deserialized columns into the new column
- Delete the old binary columns
My problem is that when I try to deserialize, it tells me that :
Unable to find assembly 'MyOldAssemblyName, Version=2.0.0.0, Culture=neutral, PublicKeyToken=a5b9cb7043cc16da'.
But this assembly doesn't exists anymore. I've no issue to put this class in my "updater" project, but no way that I can keep this old project only to contains this file.
Is there a way to specify to the BinaryFormatter that it has to deserialize the Stream it receives with a specified class?
Or say that the assembly has been renamed, or ???