运行时 Visual Studio 2010 设计器错误 [英] Visual Studio 2010 Designer Error on Run

查看:22
本文介绍了运行时 Visual Studio 2010 设计器错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 VS2010,如果我在设计器模式下打开了一个表单并运行我的应用程序,则设计器选项卡将不再显示表单设计器,而是会显示一个错误(只能通过重新启动 IDE 来修复)说:

I am using using VS2010 and if I have a form open in designer mode and run my application the designer tab will no longer show the form designer but instead an error will be displayed (and it is only fixed by restarting the IDE) saying:

为防止在加载设计器之前可能丢失数据,必须解决以下错误:"

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

1 错误:

无法显示此文件的设计器,因为没有可以设计其中的类.设计师检查了文件中的以下类:##### --- 基类 ##### 可以不被加载.确保程序集已被引用并且所有项目已经建成"

"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: ##### --- The base class ##### could not be loaded. Ensure the assembly has been referenced and that all projects have been built"

然后我显示以下调用堆栈:

I then shows the following call stack:

在 System.ComponentModel.Design.Serialization.CodeDomDesignerLoader.EnsureDocument(IDesignerSerializationManager 管理器)
在 System.ComponentModel.Design.Serialization.CodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager 管理器)
在 Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager serializationManager)
在 System.ComponentModel.Design.Serialization.BasicDesignerLoader.BeginLoad(IDesignerLoaderHost 主机)

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)

非常感谢任何帮助,这真的很烦人.

Any help is greatly appreciated this is really annoying.

谢谢,

乔尔.

推荐答案

我也时不时遇到这个 Visual Studio 错误,我深深地忽略了错误文本,而是执行以下操作:

I get this visual studio bug too now and then, and I deeply ignore the error text, instead I do the following:

  1. 关闭设计标签
  2. 在解决方案资源管理器中双击或右键单击源代码选项卡并选择查看设计器重新打开设计模式
  3. 突然一切都恢复正常了!

如果没有帮助,您可能必须将项目符号 2 更改为:关闭并重新启动 Visual Studio.

If not helping, you may have to change bullet 2 into: Close and restart Visual Studio.

也许这可以帮助你.

这篇关于运行时 Visual Studio 2010 设计器错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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