System.IO.FileNotFoundException: The specified module could not be found. Anny

加载一个确实存在的dll文件,却产生异常System.IO.FileNotFoundException: The specified module could not be found. (Exception from HRESULT: 0x8007007E)

可能原因是因为该dll所依赖的某些dll不存在。为了确定这个问题,可以使用depends.exe来查看到底丢失了哪个程序集。

具体的解释可以参考http://blogs.msdn.com/b/junfeng/archive/2006/07/31/684596.aspx

0x8007007E is a Win32 error ERROR_MOD_NOT_FOUND

The error is returned by LoadLibrary. Usually it is because one of the assembly's native dependencies(static imports) cannot be found by the OS.

原文地址:https://www.cnblogs.com/limei/p/1755097.html