在设计模式下显示WinForm并在其上显示自定义控件时出错

Cha*_*adD 5 visual-studio-2010 winforms

我有一个UserControl,它是类库的一部分.我从我的解决方案中引用这个项目.这会将引用项目的控件添加到我的工具箱中.我将控件添加到表单中.一切看起来都很好,我编译并运行.完善...

但当我关闭.frm控件并重新打开它时,我收到此错误.代码继续运行.

它可能与名称空间有关.原始命名空间只是"设计",这是模棱两可和冲突,所以我决定重命名它.我想那是我的问题开始的时候.

    To prevent possible data loss before loading the designer, the following errors must be resolved:   



    2 Errors   

  Ignore and Continue   
    Why am I seeing this page?   





   Could not find type 'Besi.Winforms.HtmlEditor.Editor'. Please make sure that the assembly that contains this type is referenced. If this type is a part of your development project, make sure that the project has been successfully built using settings for your current platform or Any CPU.     




Instances of this error (1)  

1.   There is no stack trace or error line information available for this error.  


Help with this error  

Could not find an associated help topic for this error. Check Windows Forms Design-Time error list   


Forum posts about this error  

Search the MSDN Forums for posts related to this error   






   The variable 'Editor1' is either undeclared or was never assigned.     Go to code  





Instances of this error (1)  

1.   BesiAdmin frmOrder.Designer.vb Line:775 Column:1   Show Call Stack  

at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.Error(IDesignerSerializationManager manager, String exceptionText, String helpLink)
at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeExpression(IDesignerSerializationManager manager, String name, CodeExpression expression)
at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeExpression(IDesignerSerializationManager manager, String name, CodeExpression expression)
at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeStatement(IDesignerSerializationManager manager, CodeStatement statement)  

Help with this error  

MSDN Help   


Forum posts about this error  

Search the MSDN Forums for posts related to this error   
Run Code Online (Sandbox Code Playgroud)

lc.*_*lc. 5

一些事情要尝试:

  • 检查frmOrder.Designer.vb文件是否有错误,或者可能使用错误的命名空间.我知道它可能说不要在评论中触摸文件,但有时你必须这样做.小心点

  • 如果可以的话,尝试清理/重建项目.

  • 删除并重新添加对dll的引用(并确保使用正确的命名空间引用正确的版本).也许某些东西是缓存的,不应该.

  • 退出并重启VS.