Dynamically loading an assembly based on whether current process is x32 or x64

泪湿孤枕 提交于 2020-01-03 03:49:05

问题


I have some code which dynamically loads an assembly depending on the result of the Environment.Is64BitProcess property which is then used as required.

Is this something MEF could do automatically without me having to use the Environment & Assembly classes?

Or

Would I have to write some kind of extension to MEF to achieve this?

Framework version: .Net 4.0


回答1:


Place 32 bit assemblies in one folder, and 64 bit assemblies in another. Then load the proper folder using MEF based on Environment.Is64BitProcess.



来源:https://stackoverflow.com/questions/23155470/dynamically-loading-an-assembly-based-on-whether-current-process-is-x32-or-x64

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