Using AppDomain in C# to dynamically load and unload dll

前端 未结 4 1042
無奈伤痛
無奈伤痛 2020-11-29 07:44

In one of my application, which is related to system diagnostics, the related DLL is to be loaded and unloaded dynamically in C#. After some search I found that a separate D

4条回答
  •  猫巷女王i
    2020-11-29 08:16

    It's difficult to understand your question, but I will try to make some suggestions.

    There is no reason you cannot dynamically Load a dll directly into your application w/o a separate App Domain, the trick is that you cannot unload it. This is only important if you may load multiple versions of the same dll (i.e. you want the ability to update this diagnostic component to a new version without halting the execution of your application). If that is what you are trying to do, then I suggest this CodeProject article.

提交回复
热议问题