简体   繁体   English

分发VB.NET App…是什么引起System.DllNotFoundException

[英]Distributing VB.NET App…What is causing System.DllNotFoundException

I've successfully built and tested a vb.net app in VS 2008 that uses a dll (abcTest.dll) built by another developer. 我已经在VS 2008中成功构建并测试了vb.net应用程序,该应用程序使用了另一个开发人员构建的dll(abcTest.dll)。 However, when I deploy the application to another machine (Release directory contents), I get "System.DllNotFoundException" when I run the executable. 但是,当我将应用程序部署到另一台计算机(发布目录内容)时,运行可执行文件时会出现“ System.DllNotFoundException”。 The dll is in the same directory as the executable, etc. The solution has the dll as a "Solution Item" so it seems to be reference alright. 该dll与可执行文件在同一目录中,等等。该解决方案将dll作为“解决方案项”,因此似乎可以引用。 Here is the actual error I am seeing: 这是我看到的实际错误:

************** Exception Text **************
System.DllNotFoundException: Unable to load DLL 'abcTest.dll': This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem. (Exception from HRESULT: 0x800736B1)
   at AbcCoreInterface.AbcCoreInterface.AbcOpenMap(String filename, UInt32& mapHandle)
   at AbcMapControl.AbcMapControl.Open(String fileName) in C:\dev\ACME\AbcMapControl\AbcMapControl\AbcMapControl.cs:line 508
   at VisualBasicMapTest.Form1.Form1_Load(Object sender, EventArgs e) in C:\dev\ACME\VBMapTest\VisualBasicMapTest\Form1.vb:line 39
   at System.EventHandler.Invoke(Object sender, EventArgs e)
   at System.Windows.Forms.Form.OnLoad(EventArgs e)
   at System.Windows.Forms.Form.OnCreateControl()
   at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
   at System.Windows.Forms.Control.CreateControl()
   at System.Windows.Forms.Control.WmShowWindow(Message& m)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   at System.Windows.Forms.ContainerControl.WndProc(Message& m)
   at System.Windows.Forms.Form.WmShowWindow(Message& m)
   at System.Windows.Forms.Form.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)

Basically, it seems like it can't load the dll because it can't find it and I'm not clear on why. 基本上,似乎它无法加载dll,因为它找不到它,而且我不清楚原因。

It is dying on a Windows error, 14001 = ERROR_SXS_CANT_GEN_ACTCTX, "The application has failed to start because its side-by-side configuration is incorrect. Please see the application event log for more detail." 它死于Windows错误14001 = ERROR_SXS_CANT_GEN_ACTCTX,“由于并排配置不正确,因此应用程序无法启动。有关更多详细信息,请参阅应用程序事件日志。”

Look in the Windows event log for the manifest entry that causes the problem. 在Windows事件日志中查找导致问题的清单条目。 This is usually due to a unmanaged C/C++ runtime DLL dependency that wasn't installed on the target machine. 这通常是由于未在目标计算机上安装不受管理的C / C ++运行时DLL依赖关系所致。 Also make sure that the dev didn't give you the Debug build of his DLL. 还要确保开发人员没有为您提供他的DLL的Debug版本。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM