在设计模式下显示带有自定义控件的 WinForm 时出错 [英] Error displaying a WinForm in Design mode with a custom control on it

查看:27
本文介绍了在设计模式下显示带有自定义控件的 WinForm 时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I have a UserControl that is part of a Class library. I reference this project from my solution. This adds a control from the referenced project to my toolbox. I add tghe control to a form. Everything looks good, I compile all and run. Perfect...

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

But when I close the .frm with the control on it and re-open it, I get this error. The code continues to run.

它可能与命名空间有关.最初的命名空间只是设计",这是模棱两可且相互矛盾的,所以我决定重命名它.我想那是我的问题开始的时候.

It may have something to do with namespaces. The original namespace was simply "Design" and this was ambiguous and conflicting so i decided to rename it. I think that's when my problems began.

    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 文件是否有错误,或者可能使用了错误的命名空间.我知道它可能会说不要在评论中触及文件,但有时你必须这样做.小心点.

  • Check your frmOrder.Designer.vb file for errors, or possibly using the wrong namespace. I know it probably says not to touch the file in a comment, but sometimes you have to. Just be careful.

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

Try cleaning/rebuilding your project if you can.

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

Remove and re-add the reference to your dll (and make sure you're referencing the right version with the right namespace). Maybe something is cached that shouldn't be.

退出并重新启动 VS.

Exit and restart VS.

这篇关于在设计模式下显示带有自定义控件的 WinForm 时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆