无法加载文件或程序集“***。dll的”或它的某一个依赖 [英] Could not load file or assembly '***.dll' or one of its dependencies

查看:863
本文介绍了无法加载文件或程序集“***。dll的”或它的某一个依赖的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有我创建了一个很久以前用来连接到了我开发的特定软件的数据库此DLL。我有没有问题,为超过4年,与此DLL无数的应用。

尝试部署我的最新创作,我得到以下错误:

  System.IO.FileNotFoundException:找不到无法加载文件或程序集。*** DLL或它的某一个依赖。指定的模块无法找到。
 

因此​​,对于每个DLL我曾经写了,我总是做了一个简单的表单应用程序只是自身来测试该DLL。运行简单的应用程序产生同样的错误。 DLL不加载或使用别的比:系统,System.Data这,了System.XML。因此,只要它depencies去,我看不出有什么毛病。

通过一切正常,一个开发站上的方式。的问题仅限于部署站。 .Net和必要的再发行,因为我做的一切都在C ++中,部署和工作。

运行FUSLOGVW.exe表现出的一切,工作正常。

跑带的Depends.exe说:警告:至少有一个模块有一个未解决的进口由于延迟加载相关模块缺少导出功能

我已经尝试重写了整个事情。这产生了相同的结果。

线索的人?

EDITS

下面是总的错误消息:

 有关详细信息,请参阅此消息的结尾上调用\
刚刚在实时(JIT)调试而不是此对话框。\

**************异常文本************** \
System.IO.FileNotFoundException:找不到无法加载文件或程序集connectionTo.dll或它的某一个依赖。指定的模块无法找到。\
文件名:connectionToJobboss32.dll\
   在TESTConnection.Form1.button1_Click(对象发件人,EventArgs五)\
   在System.Windows.Forms.Control.OnClick(EventArgs五)\
   在System.Windows.Forms.Button.OnClick(EventArgs五)\
   在System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)\
   在System.Windows.Forms.Control.WmMouseUp(消息和,男,MouseButtons按钮,点击的Int32)\
   在System.Windows.Forms.Control.WndProc(消息&安培;米)\
   在System.Windows.Forms.ButtonBase.WndProc(消息&安培;米)\
   在System.Windows.Forms.Button.WndProc(消息&安培;米)\
   在System.Windows.Forms.Control.ControlNativeWindow.OnMessage(消息&安培;米)\
   在System.Windows.Forms.Control.ControlNativeWindow.WndProc(消息&安培;米)\
   在System.Windows.Forms.NativeWindow.Callback(IntPtr的的HWND,味精的Int32,IntPtr的WPARAM,IntPtr的LPARAM)\
\



**************加载的程序集************** \
mscorlib程序\
    大会版本:4.0.0.0 \
    Win32版本:4.0.30319.1(RTMRel.030319-0100)\
    codeBase的:文件:/// C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll \
---------------------------------------- \
TESTConnection \
    大会版本:1.0.3996.18980 \
    Win32版本:\
    codeBase的:文件:/// C:/计划%20Files%,20(86)/conn/TESTConnection.exe \
---------------------------------------- \
System.Windows.Forms的\
    大会版本:4.0.0.0 \
    Win32版本:4.0.30319.1通过内置:RTMRel \
    codeBase的: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll\"
---------------------------------------- \
System.Drawing中\
    大会版本:4.0.0.0 \
    Win32版本:4.0.30319.1通过内置:RTMRel \
    codeBase的: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll\"
---------------------------------------- \
系统\
    大会版本:4.0.0.0 \
    Win32版本:4.0.30319.1通过内置:RTMRel \
    codeBase的: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll\"
---------------------------------------- \
 

有一个在事件查看器中没有错误。

解决方案
  

或它的一个依赖

这是通常的问题,你看不到缺少非托管的DLL与Fuslogvw.exe。做的最好的事情就是运行Sysinternals的莫过于procmon工具。你会看到它搜索的DLL,而不是找到它。中的Dependency Walker档案模式可以显示这一点。

I have this dll that I created a long time ago and use to connect to the db of a specific software that I develop for. I have had no issues for well over 4 years and countless applications with this dll.

Trying to deploy my latest creation, I get the following error:

System.IO.FileNotFoundException: Could not load file or assembly '***.dll' or one of its dependencies. The specified module could not be found.

So, for every dll I ever wrote, I always made a simple forms application to test that dll just by itself. Running that simple app yielded the same error. The dll doesn't load or use anything else than: System, System.Data, System.XML. So as far as depencies of it go, I don't see anything wrong.

By the way everything works on a dev station. The problem is limited to deployment stations. .Net and the necessary redistributables, since I do everything in C++, are deployed and working.

Running FUSLOGVW.exe showed everything as working fine.

Running depends.exe said: Warning: At least one module has an unresolved import due to a missing export function in a delay-load dependent module.

I already tried rewriting the whole thing. Which yielded the same results.

Clues anyone?

EDITS

Here is the total error message:

See the end of this message for details on invoking \"
just-in-time (JIT) debugging instead of this dialog box.\"

************** Exception Text **************\"
System.IO.FileNotFoundException: Could not load file or assembly 'connectionTo.dll' or one of its dependencies. The specified module could not be found.\"
File name: 'connectionToJobboss32.dll'\"
   at TESTConnection.Form1.button1_Click(Object sender, EventArgs e)\"
   at System.Windows.Forms.Control.OnClick(EventArgs e)\"
   at System.Windows.Forms.Button.OnClick(EventArgs e)\"
   at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)\"
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)\"
   at System.Windows.Forms.Control.WndProc(Message& m)\"
   at System.Windows.Forms.ButtonBase.WndProc(Message& m)\"
   at System.Windows.Forms.Button.WndProc(Message& m)\"
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)\"
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)\"
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)\"
\"



************** Loaded Assemblies **************\"
mscorlib\"
    Assembly Version: 4.0.0.0\"
    Win32 Version: 4.0.30319.1 (RTMRel.030319-0100)\"
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll\"
----------------------------------------\"
TESTConnection\"
    Assembly Version: 1.0.3996.18980\"
    Win32 Version: \"
    CodeBase: file:///C:/Program%20Files%20(x86)/conn/TESTConnection.exe\"
----------------------------------------\"
System.Windows.Forms\"
    Assembly Version: 4.0.0.0\"
    Win32 Version: 4.0.30319.1 built by: RTMRel\"
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll\"
----------------------------------------\"
System.Drawing\"
    Assembly Version: 4.0.0.0\"
    Win32 Version: 4.0.30319.1 built by: RTMRel\"
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll\"
----------------------------------------\"
System\"
    Assembly Version: 4.0.0.0\"
    Win32 Version: 4.0.30319.1 built by: RTMRel\"
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll\"
----------------------------------------\"

There is no errors in the event viewer.

解决方案

or one of its dependencies

That's the usual problem, you cannot see a missing unmanaged DLL with Fuslogvw.exe. Best thing to do is to run SysInternals' ProcMon utility. You'll see it searching for the DLL and not find it. Profile mode in Dependency Walker can show it too.

这篇关于无法加载文件或程序集“***。dll的”或它的某一个依赖的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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