I have a .NET Remoting server that implements a custom interface, and a client application that talks to the server. I am having trouble with backwards compatibility when I build a new version of my server -- that is, if I rebuild my server code and only change the version of the assemblies, my older client applications are unable to call certain methods on the interface while other methods work without any problems. The methods that fail generate a FileLoadException.
After some testing it seems that the only methods that break are the interface methods that are overloaded and one of the overloaded function parameters is a custom class that I have defined in my assembly. As near as I can tell, the overload method resolution algorithm is looking for an overload that takes a specific version of the custom class, and since the client and host are technically using different versions of the custom class assembly, it can't find the appropriate overload.
For what it's worth, methods that pass a custom class don't seem to have any problems as long as the method is not overloaded, and overloads don't have a problem as long as the parameters are all "stock" .NET types.
For instance, suppose I have defined the following:
Public Class TestClass
Public Interface ITest
Function TestMethod(ByVal abc As Date) As Integer
Function TestMethod(ByVal abc As Single) As Integer
Function TestMethod(ByVal abc As TestClass) As Integer
I build both my client and server referencing the above assembly, and they work just fine. But if I change the version number on this assembly, and rebuild my server, my older client can still call the first two TestMethod(..) methods, but attempts to call the third generate a FileLoadException.
(Note: my assembly is signed with a strong name key file.)
I haven't been able to find any "official" documentation saying that this isn't allowed -- only one or two other unanswered posts on other sites -- so first I wanted to see if anyone knows for sure that this isn't allowed. Second, now that I have some of this software in the field, is there any way that I can make future versions of my server backwards compatible with existing installations of my client? That is, I have already deployed client applications at say version 1 that talk to my server at version 1, but now I need to add new functions to this interface and thus must release a version 2 of my server, but I need the previously distributed clients at version 1 to continue to work.