各位兄弟,帮帮忙!
我用Vss2008写的程序里调试全部通过,我把调试里文件的Debug下的dog.exe程序拿到其他电脑上去(操作系统是XP)运行时能打开窗面,但按下按钮时就报下面的错误
有关调用实时(JIT)调试而不是此对话框的详细信息,
请参见此消息的结尾。************** 异常文本 **************
System.IO.FileNotFoundException: 找不到指定的模块。 (异常来自 HRESULT:0x8007007E)
   在 System.Windows.Forms.UnsafeNativeMethods.CoCreateInstance(Guid& clsid, Object punkOuter, Int32 context, Guid& iid)
   在 System.Windows.Forms.AxHost.CreateWithoutLicense(Guid clsid)
   在 System.Windows.Forms.AxHost.CreateWithLicense(String license, Guid clsid)
   在 System.Windows.Forms.AxHost.CreateInstanceCore(Guid clsid)
   在 System.Windows.Forms.AxHost.CreateInstance()
   在 System.Windows.Forms.AxHost.GetOcxCreate()
   在 System.Windows.Forms.AxHost.TransitionUpTo(Int32 state)
   在 System.Windows.Forms.AxHost.CreateHandle()
   在 System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
   在 System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
   在 System.Windows.Forms.AxHost.EndInit()
   在 WindowsFormsApplication1.Form1.InitializeComponent()
   在 WindowsFormsApplication1.Form1..ctor()
   在 WindowsFormsApplication1.Main.button1_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)
************** 已加载的程序集 **************
mscorlib
    程序集版本: 2.0.0.0
    Win32 版本: 2.0.50727.1433 (REDBITS.050727-1400)
    基本代码:  file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
DOG
    程序集版本: 1.0.0.0
    Win32 版本: 1.0.0.0
    基本代码:  file:///C:/Documents%20and%20Settings/Administrator/桌面/加密狗程序/DOG.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
----------------------------------------
AxInterop.YUTIAN_2Lib
    程序集版本: 1.0.0.0
    Win32 版本: 1.0.0.0
    基本代码:  file:///C:/Documents%20and%20Settings/Administrator/桌面/加密狗程序/AxInterop.YUTIAN_2Lib.DLL
----------------------------------------
AxInterop.YUTIANEXLib
    程序集版本: 1.0.0.0
    Win32 版本: 1.0.0.0
    基本代码:  file:///C:/Documents%20and%20Settings/Administrator/桌面/加密狗程序/AxInterop.YUTIANEXLib.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 值。
编译应用程序时还必须启用
调试。

解决方案 »

  1.   

    本帖最后由 caozhy 于 2011-06-26 00:51:41 编辑
      

  2.   

    控件我已成功注册了,是不是要将Debug里的所有文件都要拷贝过去吗?因为我只拷了exe文件以及需要的dll文件
      

  3.   

    System.IO.FileNotFoundException: 找不到指定的模块。 (异常来自 HRESULT:0x8007007E)
      在 System.Windows.Forms.UnsafeNativeMethods.CoCreateInstance(Guid& clsid, Object punkOuter, Int32 context, Guid& iid)缺少dll啊
      

  4.   

    肯定是少考了,直接将所有的dll都考进去
      

  5.   

    你的程序没有打包,不能单独运行Debug下的dog.exe运行文件,把Debug整个文件夹都拖过去是可以的。
      

  6.   


    正解!把调试正常的整个Debug目录拷到你另外一台电脑就OK了。