ReflectionOnlyLoadFrom & Unload?

前端 未结 2 1985
感情败类
感情败类 2020-12-19 01:05

If I do an Assembly.ReflectionOnlyLoadFrom(), is it possible to unload the assembly?

Or, can it be unloaded only if it is in a separate AppDomain, as w

相关标签:
2条回答
  • 2020-12-19 01:50

    You can create an instance in the new AppDomain and execute your code in that instance. Please see full example here: https://stackoverflow.com/a/37970043/797249

    0 讨论(0)
  • 2020-12-19 02:05

    Yes, you need to load it into a separate AppDomain, then unload the entire AppDomain.

    0 讨论(0)
提交回复
热议问题