As MSDN states:
Use the LoadFile method to load and examine assemblies that have the same identity, but are located in different paths. LoadFile does not load files into the LoadFrom context, and does not resolve dependencies using the load path, as the LoadFrom method does.
So you should use Assembly.LoadFrom
, not Assembly.LoadFile
.