Re: Side-by-side, within an app

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Mrinal Kamboj wrote:

> 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 .

Thanks, but it's pretty clear that you were right when you stated in
your 1st message "I am not very sure that i get every nitty gritty of
the issue that your facing."

I can explicitly (is, dynamically) load a second version of an already
loaded assembly. (That is, if the app implicitly (statically) loads
Library v1, a plugin can explicitly load Library v2.)

What I can't get to work - despite various combinations of app.config
and strong naming - is for loading a plugin that has a reference to
Library v2 to automatically load Library v2 at the same time that it
loads the plugin. It doesn't do any good to dynamically load Library
v2 after the loader has mapped the (already loaded) Library v1 as
satisfying the plugin's reference to Library v2.

A concrete example may help:

The app is built with the "Augustine" control library, as is the
plugin. Both use the Augustine "Toolwindow" control, but the app is
built against v1 (and so the app directory contains v1 of the library)
while the plugin is built with v2 of the library. Further, the plugin
uses the "Whizbang" property, which is not available in v1.

When the plugin is loaded, the loader will see that the Augustine
assembly is already loaded, and so will not load the v2 version from
the plugin's directory. When the plugin reads or writes the Whizbang
property, the CLR throws an exception.

So far as I know, no explicit call to Assembly.LoadX will fix this
issue: the only way to resolve it is for plugin loading to note that
the loaded copy of Augustine v1 is NOT the one that the plugin should
be using.

--

www.midnightbeach.com
.



Relevant Pages

  • Plugins doesn´t work
    ... I use the Webbrowser control in a MFC app in a CHtmlView. ... fine but if I try to load a website that contains a plugin like the vlc ...
    (microsoft.public.inetsdk.programming.webbrowser_ctl)
  • Re: Mobile Development for WM 5 with one main exe controlling mult
    ... I'm trying to convince them with what you said about the load strategy, ... it could be due to the fact that all the loading are done ... App size has nothing ... split the whole program from one exe to multiple. ...
    (microsoft.public.pocketpc.developer)
  • Re: Reprise: Pended IOCtrl + LoadLibrary == Deadlock?
    ... >3) launching msdev.exe from the shell and from within windbg. ... >load (from within msdev) ionwizrd.exe ... When I hit F5 to run my app the following occurs: ...
    (microsoft.public.development.device.drivers)
  • Re: Whose Fish?
    ... That would be much more in line with your Table Oriented Programming ... cart structure/object floating around in the app. ... intuitive way, as it is with a good object model, ... I might load CustomerInfo with read only ID ...
    (comp.object)
  • Re: Reprise: Pended IOCtrl + LoadLibrary == Deadlock?
    ... > and execute!htrace in both devenv.exe and the target app. ... launching msdev.exe from the shell and from within windbg. ... All other cases either result in not being able to run msdev or my app ... itself both when it starts up and when it is trying to load my app. ...
    (microsoft.public.development.device.drivers)