« WeakReference: GC knows the Best | Main | New* .NET 3.5 Feature: AddIn Framework ( Part 1 of 2 ) »

January 16, 2008

TrackBack

TrackBack URL for this entry:
http://www.typepad.com/services/trackback/6a00e54ee5d547883300e5501a46af8833

Listed below are links to weblogs that reference Dll heaven: Executing multiple versions of the same assembly:

Comments

Moim

DLL Heaven? lol- nice title.
This is a nice blog entry but I was wondering that in real life the name of the assemblies also remain same only the build version will be different.
But in this example the assemblies has got different names, in that case do we really need to use another application domain? if the dlls names and namespaces are different then it is possible to load into the same domain. but if every thing is same only the build version is different then we need to use different application domain. Shiplu bhai correct me if I am wrong.
another thing, you blog now made me think about another problem. If really someday I have to write some kind of plugin based system, and consider the base could be a class rather than an interface, in such scenario how can we do this? I think this is a good thing I can do some brain storming....Shiplu bhai, let me know if you have any ready-made suggestions for this.
Anyway, good post !

Shafqat Ahmed

Actually the objective of the post is to show how to load different versions of the same assembly. The plugins are mantioned here so that I can show a prospective usage.

Now to answer your question, I must point out that cross app domain communication must be done either via remoting or via serialization. Here we are using remoting ... since serialization would not work with same class and thus load from the executing appdomain. You can test this by adding serializable and removing the MarshalByRef.

So if your base object is Marshaled I do not see why it cannot be done. Also if the plugin's access to the system is also done via a predefined interface that did not change or the change was only done by creating addtional interfaces like com then it should be simple and effective.
Usually plugins are provided with partial internal object model and if that model is provided via seperate interface assembly then it should be extensible. If the root is the executing domain and is marshalled then the plugin domain should work.

Kazi Manzur Rashid

Shiplu Bhai, It is really nice to see that someone is blogging the internals of .NET framework. Very helpful tip.

Shafqat Ahmed

Thank you very much for reading.

Habib

Very helpful article. Thanks.

The comments to this entry are closed.

Feeds

Pages