日期:2014-05-18  浏览次数:20853 次

c#怎样unload已经装载的dll
c#怎样unload已经装载的dll?我有个应用采用动态装载的方式load了一个程序集,怎样unload这个程序集?

------解决方案--------------------
可以采用卸载程序域的方式,直接unload程序集好象不行,重新装载的话,老的程序集还在内存的
------解决方案--------------------
There is no way to unload an individual assembly without unloading all of the application domains that contain it. Use the Unload method from AppDomain to unload the application domains. For more information, see Unloading an Application Domain.


具体信息参考:
How to: Load and Unload Assemblies (C# Programming Guide)
http://msdn.microsoft.com/en-us/library/ms173101(v=vs.80).aspx