How to load same plugins from 2 different assemblies, and serializing and deserializing types between the two? C# .net -


so have 2 .net assemblies, 1 wpf other windows service. talk using wcf protobuf.net serializing types.

everything working smooth made primitive plugin system loads plugins, both assemblies in project load same plugins intention of sending classes within them on wire.

so... 1. wpf app loads, loads plugins (.net dlls) assembly.loadfrom 2. wcf app loads plugins (same .net dlls) assembly.loadfrom 3. both assemblies share dll (object library) explicitly referenced in source code.

all types in object library can serialize on 1 end, go on wire , deserialize no problem.

types in plugins can serialized on either end, other end throws type not resolved exception when attempting deserialize, though same type.

found out problem, shotgun willingness help, have been lot of code show.

basically protobuf couldn't load type because didn't exist in load context of application domain. read stuff on msdn had handle appdomain.currentdomain.assemblyresolve event , return correct assembly plugin types.


Comments

Popular posts from this blog

twig - Using Twigbridge in a Laravel 5.1 Package -

jdbc - Not able to establish database connection in eclipse -

firemonkey - How do I make a beep sound in Android using Delphi and the API? -