I have read this excellent blog entry on the woes of strong naming and remoting, all of which I am experiencing.
Basically, the client app will always need to load the same version of the strong named common assembly the server is using when the server returns a custom type from the common assembly to the client. I.e.:
The problem one encounters is this: as soon as there is a difference between the strong name of the common type library on the client, and the strong name of the common type library on the server, everything breaks. Remoting throws exceptions as soon as any notable client/server communication starts.
This is rather annoying since we update the version number when we build, even if no changes have been made to the common assembly. The implementation may not have changed, just the version number.
I am currently getting round this by applying binding redirection/publisher policy - however this seems a lot of engineering just to conform to the strong name rules regarding assembly resolution.
I have tried not strong naming the common assembly as recommended in the blog, which works fine/I don't get any remoting exceptions - however, is this recommended?
I am not adding the common assembly (which just contains interfaces) to the GAC, nor am I too worried about tampering, and as long as I update interfaces carefully in order to maintain backward compatibility/not break existing clients is this enough, hence no need for strong naming?
Thanks in advance.
PS: I'm aware of WCF, but I still need to maintain a remoting interface.
Avoid strong naming if at all possible! Strong naming is painful.
As you probably already know, as soon as you strong name an assembly, everything that it references has to be strong named as well. In a simple application, no big deal. If you have to deal with COM interop libraries, other projects, etc the problem becomes a maintenance nightmare.