I just started using the VersionMajMin functionality and I found out that it doesn't play too well with XmlSerializer. Particularly, when using code like the following:
Code: Select all
XmlSerializer serializer = new XmlSerializer(typeof(CalmSchema));
calmDataSet = (CalmSchema)serializer.Deserialize(reader);
[A]CalmPlugin.CalmSchema cannot be cast to CalmPlugin.CalmSchema. Type A originates from 'CalmPlugin7.2, Version=7.2.17.0, Culture=neutral, PublicKeyToken=null' in the context 'Default' at location 'C:\Documents and Settings\A\My Documents\Visual Studio 2010\Projects\opendental7.2\OpenDental\bin\Debug\CalmPlugin7.2.dll'. Type B originates from 'CalmPlugin7.2, Version=7.2.17.0, Culture=neutral, PublicKeyToken=null' in the context 'LoadNeither' at location 'C:\Documents and Settings\A\My Documents\Visual Studio 2010\Projects\opendental7.2\OpenDental\bin\Debug\CalmPlugin.dll'.
Notice that everything is the same except for the version numbers in the file name. When I delete CalmPlugin7.2, the exception goes away.
Does anyone know how to get .net to recognize the two as one and the same? I read some place about signing the assembly, but when I tried that, it didn't work because OD itself isn't signed <sigh>. Otherwise, all I can think of is to either a) delete the file programmatically upon load... or b) jimmy up my own deployment system... both of which I'd like to avoid.
Best,