是否可以将相同的DLL两次添加到AppDomain中,还是最好重用已加载的DLLC? [英] Is it possible to add the same DLL twice into AppDomain or it's better to re-use loaded DLLC?

查看:44
本文介绍了是否可以将相同的DLL两次添加到AppDomain中,还是最好重用已加载的DLLC?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的应用程序在应用程序执行期间多次加载相同的DLL。

My application loads same DLLs multiple times during application execution time.

AssemblyName assemblyName = AssemblyName.GetAssemblyName(plugin.FullPathToDLLFile);
loadedPlugin.LoadedAssembly = System.Reflection.Assembly.Load(assemblyName);

我是否使用AppDomain重复使用它们或如何使用它们?

Have I use AppDomain to re-use them or how?

关于应该正常完成操作的任何线索吗?

Any clue about how it should be done normally?

谢谢!

推荐答案

在一个具体版本中的程序集仅加载一次,而不管Assembly.Load调用计数如何。

Assembly in one concrete version is only loaded once regardless of Assembly.Load calls count.

这篇关于是否可以将相同的DLL两次添加到AppDomain中,还是最好重用已加载的DLLC?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆