问题
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