表单的设计-未注册类(HRESULT的异常:0x80040154(REGDB_E_CLASSNOTREG))

时间:2018-10-18 15:39:36

标签: c# visual-studio winforms

我的代码运行,但是当我尝试显示表单设计时,我没有注册课程。

 at System.Windows.Forms.UnsafeNativeMethods.CoCreateInstance (Guid & Clsid, Object punkOuter, Int32 context, Guid & iid)
    in System.Windows.Forms.AxHost.CreateInstanceCore (Guid Clsid)
    at System.Windows.Forms.AxHost.CreateInstance ()
    at System.Windows.Forms.AxHost.GetOcxCreate ()
    at System.Windows.Forms.AxHost.set_Site (ISite value)
    in System.ComponentModel.Container.Add (IComponent component, String name)
    in System.ComponentModel.Design.DesignerHost.PerformAdd (IComponent component, String name)
    at System.ComponentModel.Design.DesignerHost.System.ComponentModel.Design.IDesignerHost.CreateComponent (Type componentType, String name)
    at System.ComponentModel.Design.Serialization.DesignerSerializationManager.CreateInstance (Type type, ICollection arguments, String name, Boolean addToContainer)
    at System.ComponentModel.Design.Serialization.DesignerSerializationManager.System.ComponentModel.Design.Serialization.IDesignerSerializationManager.CreateInstance (Type type, ICollection arguments, String name, Boolean addToContainer)
    at the System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeInstance (IDesignerSerializationManager manager, Type type, Object [] parameters, String name, Boolean addToContainer)
    at the System.ComponentModel.Design.Serialization.ComponentCodeDomSerializer.DeserializeInstance (IDesignerSerializationManager manager, Type type, Object [] parameters, String name, Boolean addToContainer)
    in System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeExpression (IDesignerSerializationManager manager, String name, CodeExpression expression)
    at System.ComponentModel.Design.Serialization.CodeDomSerializer.DeserializeStatementToInstance (IDesignerSerializationManager manager, CodeStatement statement)
    in System.ComponentModel.Design.Serialization.CodeDomSerializer.Deserialize (IDesignerSerializationManager manager, Object codeObject)
    in System.Windows.Forms.Design.ControlCodeDomSerializer.Deserialize (IDesignerSerializationManager manager, Object codeObject)
    at System.ComponentModel.Design.Serialization.TypeCodeDomSerializer.DeserializeName (IDesignerSerializationManager Manager, String name, CodeStatementCollection statements)

0 个答案:

没有答案