Search code examples
c#.netreflection.net-assembly

Reflection InvokeMember for layered architecture


I have multiple assemblies in solution. To be able to hotswap assemblies i call methods in logic assembly by InvokeMember, but anything that this assembly call from other assemblies doesn't return anything.

  1. How to deal with that?
  2. Is there better way to hotswap assemblies?

For some reason if i refer to unavailable assembly and call it before InvokeMember it works, and anything else doesn't. The goal is to split GUI, API and logic layers, and make them available for update on heavy proprietary software without restarting it every time.


Solution

  • Solved by loading all required assemblies in caller code.