Hi,
I created a simple C# program that imports a dll (Unmanaged dll), which a coworker wrote, the dll references
other managed dll's. On the PC i built the app on everything works great ( /bin/Debug/test.exe Folder), as well the unmanaged dll resides in the same folder as the .exe.
I published the app and ran it on another PC and i receive an error " Unable to load DLL "DSVR.dll" ..." Details
************** Exception Text **************
System.DllNotFoundException: Unable to load DLL 'DSVR.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 DSVR_CSharpExample.DSVR.DSVR_Open()
at DSVR_CSharpExample.Form1.Form1_Load(Object sender, EventArgs e) in C:Program FilesH&EDSVR_CSharpExampleForm1.cs:line 127
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)
I installed the same version of .net, Redistribution 2008 SP1, Powerpacks, etc.. i ran dependency walker and everything traced out fine.
Any Suggestion on What am i doing wrong (I've been trying to figure this out for 2 days) ?
[code]
amespace DSVR_CSharpExample
{
///
/// Static class containing all of the exported methods from the DSVR library
///
public static class DSVR
{
[DllImport("DSVR.dll", EntryPoint = "DSVR_Open")]
public static extern IntPtr DSVR_Open();
[DllImport("DSVR.dll", EntryPoint = "DSVR_Close")]
public static extern void DSVR_Close(IntPtr ConnectionHandle);
.
.
.
.
[/code]
Much appreciated,
Matt
Comments
I think your .NET compiler will not consider this when publishing.
><//~Psightoplasm`~
The unmanaged dll according the dependency walker depends on 15 dll's
Thanks
Matt
Perhaps there is a spec sheet somewhere that you can just re-write the thing in .net?
><//~Psightoplasm`~