I asked a question here and apparently the problem is where I can load an assembly using Reflection's Assembly.LoadFile
or Assembly.LoadFrom
, and get the type inside that assembly, the assembly is still not accessible in the whole application. So when WPF tries to resolve a type, it doesn't find that type because it doesn't find the assembly.
My question is, can I reference an assembly at runtime, so that it will be resolvable by WPF?
A solution that works for me is handling the
CurrentDomain.AssemblyResolve
eventThis way if the application cannot resolve an assembly name it will call your handler to find it