本地的電腦都可以引用dll,但換到其他電腦就不行了!!
我寫的是一個c#的程式,引用了一個自訂dll擋(usbport.dll),在我原本的電腦上都可以執行。
但只要換到其他電腦上就會出現 unable to load dll"usbport.dll"找不到指定的模組的0X8007007e的錯誤
可以請問一下高手,到底如何會這樣嗎?
錯誤的明細:
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.
************** Exception Text **************
System.DllNotFoundException: Unable to load DLL './usbport.dll': 找不到指定的模組。 (Exception from HRESULT: 0x8007007E)
at tdebug.IDD_TDEBUG_DIALOG.ReadMem(IntPtr hdev, Int32 addr, Byte[] lpB, Int32 len, Int32 type)
at tdebug.IDD_TDEBUG_DIALOG.timer4_Tick(Object sender, EventArgs e)
at System.Windows.Forms.Timer.OnTick(EventArgs e)
at System.Windows.Forms.Timer.TimerNativeWindow.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
----------------------------------------
tdebug
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///C:/Documents%20and%20Settings/Baopusheng/My%20Documents/Downloads/10/tdebug.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
----------------------------------------
System.Management
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.1 (RTMRel.030319-0100)
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Management/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Management.dll
----------------------------------------
************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.
For example:
<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>
When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.
但只要換到其他電腦上就會出現 unable to load dll"usbport.dll"找不到指定的模組的0X8007007e的錯誤
可以請問一下高手,到底如何會這樣嗎?
錯誤的明細:
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.
************** Exception Text **************
System.DllNotFoundException: Unable to load DLL './usbport.dll': 找不到指定的模組。 (Exception from HRESULT: 0x8007007E)
at tdebug.IDD_TDEBUG_DIALOG.ReadMem(IntPtr hdev, Int32 addr, Byte[] lpB, Int32 len, Int32 type)
at tdebug.IDD_TDEBUG_DIALOG.timer4_Tick(Object sender, EventArgs e)
at System.Windows.Forms.Timer.OnTick(EventArgs e)
at System.Windows.Forms.Timer.TimerNativeWindow.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
----------------------------------------
tdebug
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///C:/Documents%20and%20Settings/Baopusheng/My%20Documents/Downloads/10/tdebug.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
----------------------------------------
System.Management
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.1 (RTMRel.030319-0100)
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Management/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Management.dll
----------------------------------------
************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.
For example:
<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>
When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.
...全文
相关推荐
C# 引用不同文件夹下的Dll文件
**编译时动态复制DLL**: 可以在项目属性的“生成”选项卡中,勾选“复制本地”选项,确保在编译后,DLL会复制到输出目录,与执行文件一起。7.
在Unity中引用Dll的两种方法
在Unity中集成Dll有两种方法,本文将对这两种方法进行详细的介绍。方法一:标准引用在 Unity 中使用标准引用可以轻松地集成外部Dll文件。下面是使用C#语言实现的示例代码:1.
vb制作DLL并引用DLL
**添加引用**:在VB项目中,要引用刚创建的DLL,首先需要在“工具”菜单中选择“引用”,打开“引用管理器”对话框。点击“浏览”按钮,找到并选择刚刚生成的DLL文件,然后点击“确定”。2.
C#将引用的dll嵌入到exe文件中
**修改DLL属性**: 对于添加的DLL文件,需要设置其属性。在解决方案资源管理器中找到该DLL,右键选择属性,将“复制本地”设置为“False”。
vs2010无法添加dll引用的处理方法
当遇到Visual Studio 2010 (VS2010)在编译过程中无法添加DLL引用的问题时,可以采取以下步骤来解决。首先,了解问题根源:DLL(Dynamic Link Library)引用无


