Hot Unload/Reload of a DLL used by an Application

后端 未结 3 1194
无人共我
无人共我 2020-11-27 21:11

I have an application that loads a DLL to execute a specific part of processing

Example : \"Application.dll\" loading \"Process.dll\" 

3条回答
  •  天命终不由人
    2020-11-27 22:14

    It's been quite a while since I looked at this but I'm fairly sure that you'd need to create a new AppDomain and then load the DLL inside there.

    The reason is that you can't unload an Assembly by it self but you can unload an AppDomain that contains an Assembly.

    Here's a CodeProject article that describes how to do this: To Unload a Running Dll

提交回复
热议问题