FileNotFoundException(未找到DLL) [英] FileNotFoundException (DLL not found)

查看:140
本文介绍了FileNotFoundException(未找到DLL)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在客户端的机器上发现了一个奇怪的错误。它抛出FileNotFoundException,但该DLL是绝对正确的在该文件夹与Executable ..为什么它找不到它?
请指教..

解决方案

精神调试,因为你没有包括完整的例外细节,是你有一个32位对64位不匹配:




  • 您的可执行文件是AnyCPU

  • 引用的DLL(或下游参考)是x86

  • 运行可执行文件的机器是64位



基本上,你会如果您有任何x86 DLL依赖(通常是非托管DLL),则必须使用x86平台重新编译您的C#可执行文件。


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..

解决方案

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).

这篇关于FileNotFoundException(未找到DLL)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆