在设计模式下显示带有自定义控件的 WinForm 时出错

2024-02-20

我有一个属于类库一部分的用户控件。我从我的解决方案中引用了这个项目。这会将引用项目中的控件添加到我的工具箱中。我将控件添加到表单中。一切看起来都不错,我编译并运行。完美的...

但是当我关闭带有控件的 .frm 并重新打开它时,出现此错误。代码继续运行。

它可能与命名空间有关。原来的命名空间只是“Design”,这是不明确且冲突的,所以我决定重命名它。我想那是我的问题开始的时候。

    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   

有几点值得尝试:

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

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

  • 删除并重新添加对 dll 的引用(并确保使用正确的命名空间引用正确的版本)。也许缓存了一些不应该缓存的内容。

  • 退出并重新启动VS。

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

在设计模式下显示带有自定义控件的 WinForm 时出错 的相关文章

随机推荐