簡體   English   中英

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

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

我已經在VS 2008中成功構建並測試了vb.net應用程序,該應用程序使用了另一個開發人員構建的dll(abcTest.dll)。 但是,當我將應用程序部署到另一台計算機(發布目錄內容)時,運行可執行文件時會出現“ System.DllNotFoundException”。 該dll與可執行文件在同一目錄中,等等。該解決方案將dll作為“解決方案項”,因此似乎可以引用。 這是我看到的實際錯誤:

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

基本上,似乎它無法加載dll,因為它找不到它,而且我不清楚原因。

它死於Windows錯誤14001 = ERROR_SXS_CANT_GEN_ACTCTX,“由於並排配置不正確,因此應用程序無法啟動。有關更多詳細信息,請參閱應用程序事件日志。”

在Windows事件日志中查找導致問題的清單條目。 這通常是由於未在目標計算機上安裝不受管理的C / C ++運行時DLL依賴關系所致。 還要確保開發人員沒有為您提供他的DLL的Debug版本。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM