我有很久以前创建的这个dll,用于连接到我开发的特定软件的db。我已经没有超过4年的问题和无数的应用程序与此DLL。无法加载文件或程序集“***。dll”或它的某个依赖关系
尝试部署我的最新创作,我得到以下错误:
System.IO.FileNotFoundException: Could not load file or assembly '***.dll' or one of its dependencies. The specified module could not be found.
所以,我写过每个DLL,我总是做了一个简单的表单应用程序只是通过自身来测试该DLL。运行这个简单的应用程序产生了相同的错误。该DLL不会加载或使用任何其他内容:System,System.Data,System.XML。所以就它的依赖而言,我没有看到任何错误。
顺便说一下,一切工作在开发站。问题仅限于部署站点。 .Net和必要的可再分发,因为我在C++中做了所有事情,都已部署并正在运行。
正在运行FUSLOGVW.exe显示一切工作正常。
正在运行depends.exe说:警告:由于延迟加载相关模块中缺少导出功能,所以至少有一个模块具有未解析的导入。
我已经尝试重写整个事情。这产生了相同的结果。
线索谁?
编辑
这是总的错误消息:
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\"
----------------------------------------\"
没有在事件查看器中没有错误。
由于我在托管C++编写的“任何CPU”不存在。无论如何我检查了配置管理器,并且都是为Win32设置的,dll和app。由于我在32位构建它,我从我的Program Files(x86)文件夹运行它以避免64位问题。 ...所以我一直在研究这个,但我没有看到任何错误。哦,我试图部署的其中一个站点是32位机器。 – 2010-12-10 16:45:58
有类似的问题。我读了你的答案,不能用VS界面改变它。所以我在文本编辑器中打开项目文件并手动将其更改为AnyCPU,并且它可以工作。即使VS界面接受值,因为它应该在第一位。 – 2013-04-15 11:39:13