有关调用实时(JIT)调试而不是此对话框的详细信息,
请参见此消息的结尾。************** 异常文本 **************
System.IO.FileNotFoundException: 未能加载文件或程序集“MySQLDriverCS, Version=3.0.1735.36021, Culture=neutral, PublicKeyToken=172f94dfb0faf263”或它的某一个依赖项。系统找不到指定的文件。
文件名:“MySQLDriverCS, Version=3.0.1735.36021, Culture=neutral, PublicKeyToken=172f94dfb0faf263”
   在 AttLogs.AttLogsMain.button2_Click(Object sender, EventArgs e)
   在 System.Windows.Forms.Control.OnClick(EventArgs e)
   在 System.Windows.Forms.Button.OnClick(EventArgs e)
   在 System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
   在 System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   在 System.Windows.Forms.Control.WndProc(Message& m)
   在 System.Windows.Forms.ButtonBase.WndProc(Message& m)
   在 System.Windows.Forms.Button.WndProc(Message& m)
   在 System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   在 System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   在 System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)警告: 程序集绑定日志记录被关闭。
要启用程序集绑定失败日志记录,请将注册表值 [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD)设置为 1。
注意: 会有一些与程序集绑定失败日志记录关联的性能损失。
要关闭此功能,请移除注册表值 [HKLM\Software\Microsoft\Fusion!EnableLog]。************** 已加载的程序集 **************
mscorlib
    程序集版本: 2.0.0.0
    Win32 版本: 2.0.50727.1433 (REDBITS.050727-1400)
    基本代码: file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
AttLogs
    程序集版本: 1.0.4828.30538
    Win32 版本: 1.0.4828.30538
    基本代码: file:///C:/Project/AttLogs.exe
----------------------------------------
System.Windows.Forms
    程序集版本: 2.0.0.0
    Win32 版本: 2.0.50727.1433 (REDBITS.050727-1400)
    基本代码: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
    程序集版本: 2.0.0.0
    Win32 版本: 2.0.50727.1433 (REDBITS.050727-1400)
    基本代码: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
    程序集版本: 2.0.0.0
    Win32 版本: 2.0.50727.1433 (REDBITS.050727-1400)
    基本代码: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Windows.Forms.resources
    程序集版本: 2.0.0.0
    Win32 版本: 2.0.50727.1433 (REDBITS.050727-1400)
    基本代码: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms.resources/2.0.0.0_zh-CHS_b77a5c561934e089/System.Windows.Forms.resources.dll
----------------------------------------
mscorlib.resources
    程序集版本: 2.0.0.0
    Win32 版本: 2.0.50727.1433 (REDBITS.050727-1400)
    基本代码: file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------************** JIT 调试 **************
要启用实时(JIT)调试,
该应用程序或计算机的 .config 文件(machine.config)的 system.windows.forms 节中必须设置
jitDebugging 值。
编译应用程序时还必须启用
调试。例如: <configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>启用 JIT 调试后,任何无法处理的异常
都将被发送到在此计算机上注册的 JIT 调试器,
而不是由此对话框处理mysqlc#

解决方案 »

  1.   

    程序在release状态下能正常运行,在debug状态下就报错!
      

  2.   

    MySQLDriverCS程序集所在的动态库你拷过去了吗
      

  3.   

    是MySqlDriverCS.dll这个文件吗?拷到哪儿?
      

  4.   

    编译的时候就直接报:警告 5 引用程序集“..\MySQLDriverCS.dll”面向的是另一个处理器,而不是应用程序。 AttLogs
      

  5.   

    未能加载文件或程序集“MySQLDriverCS, Version=3.0.1735.36021, Culture=neutral, PublicKeyToken=172f94dfb0faf263”或它的某一个依赖项。试图加载格式不正确的程序。
      

  6.   

    是不是debug下你的目标平台跟release下不一样?
    你在解决方案里右键点项目,进入属性里看看目标平台是什么?
      

  7.   

    VS2008里面的项目目标framework是.NET3.5的,机器上装的framework是3.5的
      

  8.   

    嗯,不行,debug下还是报错。明天再看看怎么解决吧,谢谢您的帮助!