I've successfully built and tested a vb.net app in VS 2008 that uses a dll (abcTest.dll) built by another developer. However, when I deploy the application to another machine (Release directory contents), I get "System.DllNotFoundException" when I run the executable. 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. 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.