PersistenceHelper class checks assembly version?

2786
0
11-29-2015 11:51 PM
RemcoHommersom
New Contributor

In my add-in I use the PersistenceHelper class to serialize and deserialize objects to the mxd. This class however seems to compare the version of the executing assembly to the version of the assembly that was used saving the stream. If the version is not the same the stream is not loaded and the error below occurs:

System.Runtime.Serialization.SerializationException: Unable to find assembly 'MyAddin', Version=4.11.0.0

If I set the assembly version to a fixed version number it works. This is of course not desirable from a version management point of view. Before the add-in model was introduced I used the IPersistVariant interface with COM, this has not this issue. But add-ins do not support this design and ESRI recommends using the PersistenceHelper class. Any thoughts on solving or working around this problem?

Tags (1)
0 Kudos
0 Replies