C#显示不了窗体,报告这个错误,请问如何解决
C#显示不了窗体,报告这个错误,请问如何解决
The designer could not be shown for this file because none of the classes within it can be designed. The designer inspected the following classes in the file: FrmMdiMain --- The base class 'System.Object' cannot be designed.
Hide
at System.ComponentModel.Design.Serialization.CodeDomDesignerLoader.EnsureDocument(IDesignerSerializationManager manager)
at System.ComponentModel.Design.Serialization.CodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager manager)
at Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager serializationManager)
at System.ComponentModel.Design.Serialization.BasicDesignerLoader.BeginLoad(IDesignerLoaderHost host)
你关了VS,再打开看看,一般这样就可以了
或者你重建一下项目(build all)
确实如此。看来是BUG
还有可能是你的代码有错误,继承的时候很容易出这样的错误的!