vs2010 windows应用程序设计时错误
我们在 Windows 应用程序项目中遇到自定义用户控件的问题。 我们使用 Visual Studio 2010 (C#)。 当我们打开包含自定义控件的窗体的设计视图时,设计视图显示以下错误: https://i.sstatic.net/sZMxW.jpg
表单属于 ui.forms,而自定义控件属于 ui.controls。
这个错误突然出现,即使我们恢复到较旧的版本,它仍然出现。
如果我们单击“忽略并继续”,第一个错误不会导致任何问题,但控件“specializzazioni1”不再出现在表单中。 无论如何,在执行时,它显示正确。
we have a problem with a custom user control in a windows application project.
we use visual studio 2010 (c#).
when we open the design view of a form that includes a custom control, the design view shows the following error:
https://i.sstatic.net/sZMxW.jpg
the form belongs to ui.forms while the custom control belongs to ui.controls.
this error appeared suddenly, and even if we revert to an older revision, it still appears.
if we click on "ignore and continue", the first error doesn't cause any problem, but the control "specializzazioni1" doesn't appear in the form anymore.
anyway, at execution time, it appears correctly.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
以下有时有助于捕获设计时错误。 参考< /a>
Some times below helps to catch design time errors. Reference
通常,当您在 VS 设计器中遇到这样的错误时,这是因为您的用户控件 \ 表单的构造函数中抛出了异常 - 所以我会首先检查那里发生了什么。也许您正在做某种出错的初始化?
Usually when you encounter errors like this in the VS designer it's because an exception is thrown in the constructor of your user control \ form - so i'd check what's going on there to begin with. Maybe you're doing some kind of initialisation that's going wrong ?