Dew*_*olo 33 .net dll dependencies managed-c++ reference
我有很久以前创建的这个DLL,用于连接我开发的特定软件的数据库.我已经有4年多没有问题和无数的应用程序与这个DLL.
尝试部署我的最新创建,我收到以下错误:
System.IO.FileNotFoundException: Could not load file or assembly '***.dll' or one of its dependencies. The specified module could not be found.
Run Code Online (Sandbox Code Playgroud)
因此,对于我写过的每个dll,我总是制作一个简单的表单应用程序来测试该DLL本身.运行这个简单的应用程序产生了同样的错误.该DLL不会加载或使用除以下内容之外的任何内容:System,System.Data,System.XML.因此,就它的依赖性而言,我没有看到任何错误.
顺便说一句,一切都在开发站工作.问题仅限于部署站..Net和必要的可再发行组件,因为我用C++完成所有工作,所以部署和工作.
运行FUSLOGVW.exe显示一切正常.
运行depends.exe说:警告:由于延迟加载相关模块中缺少导出功能,至少有一个模块具有未解析的导入.
我已经尝试重写整个事情了.这产生了相同的结果.
有线索吗?
EDITS
以下是总错误消息:
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\"
----------------------------------------\"
Run Code Online (Sandbox Code Playgroud)
事件查看器中没有错误.
Han*_*ant 36
或其中一个依赖项
这是通常的问题,你无法看到Fuslogvw.exe丢失的非托管DLL.最好的办法是运行SysInternals的ProcMon实用程序.你会看到它搜索DLL而不是找到它.Dependency Walker中的配置文件模式也可以显示它.
lig*_*ght 18
昨天我遇到了与dll相同的问题,所有引用的都是System,System.Data和System.Xml.原来,Platform类型的构建配置没有排队.dll是为x86构建的,使用它的程序是"任何CPU",因为我正在运行x64机器,它运行程序为x64并且与x86 dll有问题.我不知道这是不是你的问题,只是认为我会把它作为别的东西来检查.
小智 6
我有同样的问题.对我来说,这是由我机器上本地IIS服务器的默认设置引起的.所以解决它的简单方法是使用内置的Visual Studio开发服务器而不是:)
x64计算机上较新的IIS版本具有默认情况下不允许32位应用程序运行的设置.要在本地IIS中启用32位应用程序,请在IIS管理器中选择相关的应用程序池,单击"高级设置",然后将"启用32位应用程序"从False更改为True
我最近遇到了这个问题,该应用程序可以在开发人员计算机上正常运行并选择其他计算机但不会在最近安装的计算机上 事实证明,它所运行的机器安装了Visual C++ 11 Runtime,而新安装的机器却没有.将Visual C++ 11 Runtime可再发行组件添加到应用程序安装程序修复了该问题 ...
我最近遇到了这个。原来,旧的 DLL 是用以前的版本 (Visual Studio 2008) 编译的,并且引用了该版本的动态运行时库。我试图在只有 .NET 4.0 的系统上运行它,而且我从未安装过任何动态运行时库。解决方案?我重新编译了 DLL 以链接静态运行时库。
在事件查看器 (EVENTVWR.EXE) 中检查您的应用程序错误日志。它将为您提供有关错误的更多信息,并可能会指出问题的真正原因。