FileNotFoundException (DLL not found)

回眸只為那壹抹淺笑 提交于 2019-12-04 07:05:24

问题


I'm getting that strange error on one of client's machines. It throws FileNotFoundException, but that DLL is definitely right there in the folder with Executable.. Why it can't find it? Please advise..


回答1:


Psychic debugging, since you have not included the full exception details, is that you have a 32bit versus 64bit mismatch:

  • Your Executable is AnyCPU
  • The referenced DLL (or a downstream reference) is x86
  • The machine running the executable is 64bits

Basically, you'll have to recompile your C# executable with a Platform of x86 if you have any x86 DLL dependency (usually an unmanaged DLL).




回答2:


The assembly may be missing one of its dependent assemblies.



来源:https://stackoverflow.com/questions/8224134/filenotfoundexception-dll-not-found

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