Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / January 2006

Tip: Looking for answers? Try searching our database.

Plug-in capable application architecture leads to version trouble

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
George - 09 Jan 2006 01:51 GMT
I have a .NET 1.1 C# app (lets call it MyApp.exe) which is designed to
do some boring thing (not important now) but it can be extended with
plug-ins.   These plug-ins are subclasses of a type (PlugInBase)
contained in a shared assembly (MySDK.dll).   At startup, MyApp.exe
reads the registry for a list of plug-in assemblies to load from the
GAC.   These assemblies are instanciated (using Assembly.Load) and
searched for types that subclass MySDK.PlugInBase.  When found, these
types are instanciated with Activator used normally.

>From its inception, it was my intention to have others (3rd parties)
create the plugins.  I expected them to develop their plugin by
referencing MySDK.dll and implementing their own subclasses of
PlugInBase.  Then, to integrate their plugin into MyApp, they need to
install their assembly into the GAC and add a registry entry requesting

MyApp to load it by name.

My initial testing worked well.  I created projects within my main
VS.NET solution that contained implementations of PlugInBase and were
installed into the GAC with a post-build event.   Everything seemed to
be fine... until I tried to separate the plug-in projects from the main

solution.   It became a versioning nightmare.

What I have missed is the simple fact that MySDK.dll is strongly named
and everytime I fix a bug and release a new version of it (example
1.0.0.0 to 1.0.0.1),  all  plug-ins must be recompiled using the new
version of MySDK.dll.   This is impractical, since it would require
massive coordination with 3rd party authors - some of whom I may not
know.

The solution I seek would allow me to patch MyApp.exe  and MySDK.dll,
without requiring a recompile of the 3rd party plug-ins.  Can this be
done?

I have pondered this question and have some thoughts and questions?

Can an assembly load event be hooked which allows me to substitute the
new assembly?
Would a config file setting help?
Should I change my plug-in communication from inprocess to something
else (maybe  .NET remoting)?
Is there something in .NET 2.0 which can help?  I don't want to
upgrade, but will if necessary.
Should i consider an interface only approach - removing my
implementation from the MySDK assembly and thereby minimizing the
number of updates to the assembly?

I welcome all ideas and advice
Mattias Sjögren - 09 Jan 2006 06:31 GMT
>Would a config file setting help?

Yes, check out the bindingRedirect element. You may also want to read
about publisher policy.

Mattias

Signature

Mattias Sjögren [C# MVP]  mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.