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

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

问题描述

我正在使用VS2010,如果我在设计器模式下打开了一个窗体并运行我的应用程序,则设计器选项卡将不再显示该窗体设计器,而是显示一个错误(并且只有通过重新启动IDE才能解决)说:


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



1错误:



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


然后显示以下调用堆栈:


在System.ComponentModel.Design.Serialization.CodeDomDesignerLoader.EnsureDocument(IDesignerSerializationManager管理器)
$ b System.ComponentModel.Design.Serialization.CodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager管理器)中的$ b在System.ComponentModel.Design.Serialization.BasicDesignerLoader.BeginLoad(IDesignerLoaderHost主机)上


任何帮助都非常感谢,这真的很烦人。 / p>

谢谢



Joel。

解决方案

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


  1. 关闭设计选项卡

  2. 通过在解决方案资源管理器中双击或右键单击源代码选项卡并选择查看设计器,重新打开设计模式

  3. 突然一切恢复正常!

如果没有帮助,您可能不得不nge项目符号2进入:
关闭并重新启动Visual Studio。



也许这可以帮助您。


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 Error:

"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:

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.

Thanks,

Joel.

解决方案

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

  1. Close the Design-tab
  2. Reopens the Design mode by double click in Solution Explorer, or by right clicking Source code tab and select View Designer
  3. Suddenly everything works again!

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

Maybe this can help you out.

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

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