hikalkan / scs

TCP Server/Client Communication and RMI Framework
MIT License
225 stars 112 forks source link

Remote method execution problem after library merge #41

Open ScarletKuro opened 5 years ago

ScarletKuro commented 5 years ago

Lets Say you have Client and Server. If you merge Client with Scs and CommonLib(ScsService) with some ILMerge tool, then the method execution stops to work. I noticed that the DeserializationAppDomainBinder on server side is trying to find an not existing library. Like it's trying to find Client lib that got merged instead of Scs.dll. Is there way to bypass it?

ScarletKuro commented 5 years ago

Nvm. Looks like changing it to this helped return AppDomain.CurrentDomain.GetAssemblies().Select(assembly => assembly.GetType(typeName)).FirstOrDefault(t => t != null);