I am working on an application that downloads plugins. Plug-ins are in the directory below my main application directory.
It looks like:
Myappppolder
-----------> ThePluginFolder
---------------- Assembly1
---------------- Dependency1
My problem is with Dependency1 (this is an assembly that references assembly 1). CLR does not find it.
I read Fusion, and it looks like I can fix this by setting Private Path with currentAppDomain.AppendPrivatePath.
However, in .NET 4.0 help, they say that this method is deprecated. They point me to AppDomainSetup, but I cannot use this to change my current application domain.
Does anyone know what else I can do to download these dependencies?
Parameters that I reviewed:
I could manually iterate over the references to Assembly1, and if I find the assembly in the plug-in folder, I can manually load it. (seems like my best option, but I want to make sure that I haven't missed anything)
I can hook on the AssemblyResolve event of my current domain (but it even looks strange - you return a value. Does this mean that it is not a multicast? I process one aspect of the plug-in (business rule), that if another part of my application needs report plugins ? Do I need 1 global event handler?
source share