I have a WPF DLL project that contains my custom controls, themes, styles, etc., that is built as AnyCPU.
I have a dependency on an open source web browser control that doesn't have native AnyCPU support, but does have separate x86/x64 assemblies.
In an EXE, it is fairly simple. I can handle the AppDomain.CurrentDomain.AssemblyResolve event check for a 64 bit process and do an Assembly.LoadFile with the proper assemblies.
How do I dynamically resolve the dependency at runtime in a DLL project?