How to just load the latest version of dll from GAC

别来无恙 提交于 2019-12-01 18:58:32

问题


I've written a batch execution framework and in it I want (in some scenarios) to load an assembly from the GAC where there may be multiple versions but I just want to load the latest version.
Is this even possible?

TIA


回答1:


Assembly.LoadWithPartialName(string) will do exactly what you want.




回答2:


You should be able to use a publisher policy with a BindingRedirect. See this SO answer.




回答3:


Linq to Gac can query the GAC. You can load assembly at runtime once you know what you want.



来源:https://stackoverflow.com/questions/283419/how-to-just-load-the-latest-version-of-dll-from-gac

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!