积极答复者
winform 生成exe后 在本机运行没问题 到了别的电脑后就出了异常(别的电脑没装环境)

问题
-
有关调用实时(JIT)调试而不是此对话框的详细信息,
请参见此消息的结尾。
************** 异常文本 **************
System.Runtime.InteropServices.COMException (0x80040154): 没有注册类 (异常来自 HRESULT:0x80040154 (REGDB_E_CLASSNOTREG))
在 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()
在 System.Windows.Forms.Control.ControlCollection.Add(Control value)
在 System.Windows.Forms.TabPage.TabPageControlCollection.Add(Control value)
在 WindowsFormsApplication1.Form3.NewTabPage(String title, String lj) 位置 C:\Documents and Settings\Administrator\桌面\税务系统\WindowsFormsApplication1\WindowsFormsApplication1\Form3.cs:行号 773
在 WindowsFormsApplication1.Form3.clk7_LinkClicked(Object sender, LinkLabelLinkClickedEventArgs e) 位置 C:\Documents and Settings\Administrator\桌面\税务系统\WindowsFormsApplication1\WindowsFormsApplication1\Form3.cs:行号 624
在 System.Windows.Forms.LinkLabel.OnLinkClicked(LinkLabelLinkClickedEventArgs e)
在 System.Windows.Forms.LinkLabel.OnMouseUp(MouseEventArgs e)
在 System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
在 System.Windows.Forms.Control.WndProc(Message& m)
在 System.Windows.Forms.Label.WndProc(Message& m)
在 System.Windows.Forms.LinkLabel.WndProc(Message& msg)
在 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.4927 (NetFXspW7.050727-4900)
基本代码: file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
纳税系统
程序集版本: 1.0.0.0
Win32 版本: 1.0.0.0
基本代码: file:///C:/Users/Admin/Desktop/Release/Release/纳税系统.exe
----------------------------------------
System.Windows.Forms
程序集版本: 2.0.0.0
Win32 版本: 2.0.50727.4927 (NetFXspW7.050727-4900)
基本代码: 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.4927 (NetFXspW7.050727-4900)
基本代码: file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
程序集版本: 2.0.0.0
Win32 版本: 2.0.50727.4927 (NetFXspW7.050727-4900)
基本代码: file:///C:/Windows/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
mscorlib.resources
程序集版本: 2.0.0.0
Win32 版本: 2.0.50727.4927 (NetFXspW7.050727-4900)
基本代码: file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
AxInterop.CELL50Lib
程序集版本: 1.0.0.0
Win32 版本: 1.0.0.0
基本代码: file:///C:/Users/Admin/Desktop/Release/Release/AxInterop.CELL50Lib.DLL
----------------------------------------
System.Windows.Forms.resources
程序集版本: 2.0.0.0
Win32 版本: 2.0.50727.4927 (NetFXspW7.050727-4900)
基本代码: file:///C:/Windows/assembly/GAC_MSIL/System.Windows.Forms.resources/2.0.0.0_zh-CHS_b77a5c561934e089/System.Windows.Forms.resources.dll
----------------------------------------
************** JIT 调试 **************
要启用实时(JIT)调试,
该应用程序或计算机的 .config 文件(machine.config)的 system.windows.forms 节中必须设置
jitDebugging 值。
编译应用程序时还必须启用
调试。
例如:
<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>
启用 JIT 调试后,任何无法处理的异常
都将被发送到在此计算机上注册的 JIT 调试器,
而不是由此对话框处理。
答案
-
你好!
你的COM组件要先在目标机器上进行注册,具体可以参考:
http://www.cnblogs.com/witluo/archive/2006/11/16/562880.html
希望对你有帮助!
周雪峰- 已建议为答案 Raymond TangModerator 2010年5月10日 14:55
- 已标记为答案 Jing0Moderator 2010年5月17日 2:53
-
-
请确认被安装的机器已经拥有了对应的NET FRAMEWORK版本,并且已经注册了第三方的COM类。
建议你不要直接拷贝程序,而是制作一个安装程序发布给客户。具体使用VS制作安装程序的过程请参见此处:
http://www.cnblogs.com/my6521/archive/2009/03/24/1420893.html
- 已标记为答案 Jing0Moderator 2010年5月17日 2:53
全部回复
-
你好!
你的COM组件要先在目标机器上进行注册,具体可以参考:
http://www.cnblogs.com/witluo/archive/2006/11/16/562880.html
希望对你有帮助!
周雪峰- 已建议为答案 Raymond TangModerator 2010年5月10日 14:55
- 已标记为答案 Jing0Moderator 2010年5月17日 2:53
-
-
请确认被安装的机器已经拥有了对应的NET FRAMEWORK版本,并且已经注册了第三方的COM类。
建议你不要直接拷贝程序,而是制作一个安装程序发布给客户。具体使用VS制作安装程序的过程请参见此处:
http://www.cnblogs.com/my6521/archive/2009/03/24/1420893.html
- 已标记为答案 Jing0Moderator 2010年5月17日 2:53
-