Re: Side-by-side, within an app

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Hi ,

If u would have a peek through link send by me on msdn , then it clearly states about various App. config file parameters to get the required assembly loaded .

I think if u try playing with Assembly Identitiy , Binding Redirect , Code Base and Qualify Assembly , then ur stuff is very much acheivable .

What i think way out is :

1. Load Assembly using Assembly.LoadWithPartialName .
2. Define Qualify Assembly parameter in config file with complete details .

3. Get ur assemblies only in GAC , not in App. directory as it's first place to search otherwise .

4. make sure before ur refer to a different assembly , you change the config file at runtime .

that's what i can gather from MSDN .

Mrinal

Jon Shemitz wrote:

Have you tried loading each plugin into its own AppDomain, where as Jim
suggests, each AppDomain has its PrivateBinPath set to the folder of the
plugin?


I've told my customer that that's an option, but I'm reluctant to go
that route because it will make inter-plugin communication more
expensive.

Not to mention that that's a pretty huge change to make when we're
already a month past the original date for handing a first version to
QA ;-).


| I'm developing an app with a plugin architecture. Currently, all
| plugins and all referenced assemblies live in the same directory as
| the app itself.
|
| I'm being asked to move each plugin to its own directory, primarily so
| that plugin A can use version X of component library L, while plugin B
| can use version Y of the same component library L. That is, each
| plugin will have the assemblies it needs (has a compile-time reference
| to) in its own directory.
|
| I'm having some trouble getting this to work. ;-)
|
| I have a prototype loader that (statically) uses "Library", v1. I have
| a prototype 'plugin' that (statically) uses both "Library", v2, and
| "PrivateLibrary." When the loader dynamically loads the plugin,
| "PrivateLibrary" loads just fine, but only "Library", v1.
|
| Even if, after loading, I try to load "Library", v2 (both via an
| AssemblyName with a Name, Version, and CodeBase, or via a string like
| "Library, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null") what
| I get back is a reference to "Library", v1. (And this isn't even what
| I want - I want loading each plugin to also load the plugin's personal
| copy of any libraries (from the same directory as the plugin) without
| any special work ... just like "PrivateLibrary" gets loaded.)
|
| Is what I'm being asked to do even possible? Any pointers will be
| greatly appreciated!


.



Relevant Pages

  • Assembly lookup , GAC and plugins
    ... I have an app which can load "plugins" assemblies that are described ... in the registry (each registry entry gives the full path to the plugin ... Each plugin defines a class which implements an interface known to the ...
    (microsoft.public.dotnet.general)
  • Re: Updated Strong Named Assembly
    ... you have to tell your app ... to use newer versions of assemblies (in the .config file) or it will ALWAYS ... > However, after making changes to the source, these changes are not ...
    (microsoft.public.dotnet.framework.aspnet)
  • Where is the app.exe.config supposed to go?
    ... configuration read is failing to find a key. ... and copied the keys over to the app config file but the app is still failing ... D:\Projects\A\bin contains a dozen different assemblies that the test ...
    (microsoft.public.dotnet.languages.csharp)
  • Side-by-side, within an app
    ... I'm developing an app with a plugin architecture. ... plugin will have the assemblies it needs (has a compile-time reference ... When the loader dynamically loads the plugin, ...
    (microsoft.public.dotnet.framework.clr)
  • Re: VStudio 2002 using wrong version of .Net
    ... but you can certainly make it reference v1.1 assemblies. ... you can use a config file to make your app run under the v1.1 ... v1.1 of the framework. ...
    (microsoft.public.dotnet.framework.setup)