System.Runtime.InteropServices.COMException (0x80040154): 没有注册类 (异常来

************** 异常文本 **************
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(Boolean fIgnoreVisible)
在 System.Windows.Forms.AxHost.EndInit()
在 CPC.COMMON.frmEditSheet.InitializeComponent()
在 CPC.COMMON.frmEditSheet..ctor()
在 CPC.COMMON.frmEditor.GetEditSheet()
在 CPC.COMMON.frmEditor.AddTempAloneForm_new(ShenQingWJ tsf, String autoString)
在 CPC.COMMON.frmEditor.dcDocument_EditClick(Object sender, FileInfoEvent e)
在 Utility.Controls.dockcontrol.listView1_MouseDoubleClick(Object sender, MouseEventArgs e)
在 System.Windows.Forms.Control.OnMouseDoubleClick(MouseEventArgs e)
在 System.Windows.Forms.ListView.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)
是否是因为系统问题呢

解决办法:在项目属性里设置“生成”=>“目标平台”为x86而不是默认的ANY CPU.
因为大多数组件都是32位的,所以生成平台设置为x86.
温馨提示:答案为网友推荐,仅供参考
第1个回答  2015-04-13
楼主解决了吗

相关了解……

你可能感兴趣的内容

本站内容来自于网友发表,不代表本站立场,仅表示其个人看法,不对其真实性、正确性、有效性作任何的担保
相关事宜请发邮件给我们
© 非常风气网