MS VS C# 2012
I develope an application that uses MEF to interconnect several binary assemblies loaded from a database. One of its separate plug-in assemblies has dependency on a third party DLL that cannot be included in the main application. When I include that third party dll in the main application's references (plug-in has the reference too), compile and run it then the application runs smoothly. But when I remove that DLL from the main application's references (I do not need it there actually, I need to reference it in the plug-in's project only) and use AppDomain.CurrentDomain.AssemblyResolve event to load the third party DLL assembly from database then it runs OK, but later, at runtime, when the plug-in tries to use a XXX type (located in that third party assembly) the application raises an exception, complaining it cannot find the XXX type in the main assembly. I'm stuck.
Does anyone know what could cause that? Any sane explanation would be very appreciated.