Working with a plugin architecture (binary references)

D

Dan Dorey

I'm in the midst of creating a plugin framework with the goal of making

it as easy as possible for myself and other developers to both create
new plugins and work with existing ones.

Each plugin has a seperate sub-dir for each plugin with all external
dependencies located in this directory. When I load these plugins
dynamically everything appears to work properly.


So now let's pretend that I'm developing down the road and I'm creating

a component that relies on one or more of these plugins. I think
ideally I'd just like to make a binary reference to the DLL in the
plugin that contains the classes I need. Since the plugin directories
contain all their external dependencies I've set the "Copy Local"
option to false. However when I do this I get DLL missing errors at run

time:


"
[Could not load file or assembly 'prairieFyre.Interfaces,
Version=5.0.50928.0, Culture=neutral, PublicKeyToken=c70c681b5e8152b2'
or one of its dependencies. The system cannot find the file specified.]

:
at prairieFyre.IQDrivers.DriverMiTAI.ProcessCallEvent(CallEvent
callEvent)
at prairieFyre.IQDrivers.DriverMiTAI.OnMiTAIEvent(String mitaiEvent)
(DriverMiTAI - OnMiTAIEvent)
"


I don't have these problems if I'm loading this plugin at runtime. If I

copy prairieFyre.Interfaces to the /bin/debug directory everything
works fine in the above scenario.


My Plugins are located in /bin/debug/Plugins/<plugin-dir> and I have
the following app.config for probing:


<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<probing privatePath="bin"/>
</assemblyBinding>
</runtime>
</configuration>


Any thoughts on what's going on? Or if someone has an entirely
different approach to what I'm trying to do, I'm open to suggestions!


Thanks,
Dan
 
G

Guest

Dan,

I'm trying to create a plugin framework similar to what you mentioned. I'm
curious what approach you are taking. I've been looking into user controls
or master pages as as possible approaches. We want to allow a developer to
build a plugin for a host application, and drop it in to the host app's file
structure w/ minimal changes to the host app. The host app will dynamically
update it's menu, providing navigation to the new functionality. Everything
I've tried is problematic because the line between host app and plugin gets
pretty fuzzy during development and deployment.

We're using ASP.NET 2.0.

I've run into the same error as you after setting a probing path. Any luck
resolving it?

Thanks,
Chris
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top