How to use recompiled DLL?

  • Thread starter Thread starter Brett
  • Start date Start date
B

Brett

I have an app that uses properties and function return values from certain
DLLs. Each DLL returns the same thing but gets it in a different way. An
abstract class is used to access DLLs.

If I need to change code in one of the DLL methods, then recompile it, is
there a way to have the app use the recompiled DLL without shutting down?
What is the correct approach for this?

Thanks,
Brett
 
Hi,

Yes, you will need to load that DLL to a separate AppDomain (and the
abstract class must be inherited from MarshalByRefObject).
When you need to reload the DLL, shut down that AppDomain, create a new one
and load the DLL into the newly created domain.
 
Back
Top