Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You should check out the Managed Extensibility Framework (MEF). It makes doing what you want to do much easier and abstracts you away from having to worry about AppDomains and different assemblies. </p> <p><strong>Edit:</strong></p> <p>If you wish to use reflection only to achieve what you want, it'll require a flexible object model within your application. The basics of this approach is what MEF kind of does underneath the hood. Where you really get the power to do this is from .Net remoting, so I'd suggest you read up on that. </p> <p>What you'll need:</p> <ul> <li><p>Your application in (assembly A).</p></li> <li><p>Assembly with old class code (assembly C).</p></li> <li><p>A Remote Loader class that will act as your proxy/remote to the second AppDomain.</p></li> <li><p>A proxy class that will represent an instance of the old version of a class.</p></li> <li><p>Assembly B which will contain your proxy class and your remote loader.</p></li> </ul> <p>Here's what you could try:</p> <ol> <li><p>Load application from assembly A.</p></li> <li><p>Create new AppDomain instance.</p></li> <li><p>Instantiate an instance of your "Remote Loader" class in the new AppDomain from assembly B.</p> <p>a. This will cause assembly B to be loaded into the AppDomain.</p></li> <li><p>From your "Remote Loader", load assembly C and instantiate your old class then pass back an instance of the proxy class to the original AppDomain.</p></li> <li><p>Now hopefully you can modify your methods to accept a more generic version of the object (possibly an interface?) that the proxy and your new class version can both implement.</p></li> </ol>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload