C#2008设计器加载器没有提供根组件,但没有说明原因 [英] C# 2008 The designer loader did not provide a root component but has not indicated why

查看:120
本文介绍了C#2008设计器加载器没有提供根组件,但没有说明原因的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近开始遇到VS 2008 C#项目的问题,其中主要表单将在VS Form Designer中首次加载和绘制时加载。但是,如果我然后进行构建,转到代码显示,然后返回到表单,我得到错误"设计器加载器没有提供根组件但没有说明原因"。它还说"没有可用于此错误的堆栈跟踪或错误行信息"。



我在这些论坛上搜索了这个错误,但是只看到它报告了VS2005。在这些情况下,唯一的建议是通过生成的表单代码并注释掉 InitializeComponent()的部分,试图通过消除过程找到错误。我的表单是一组非常复杂的嵌套选项卡,用作向导,我的InitializeComponent方法接近3000行,所以我很想找到解决问题的另一种方法。



是否有可能影响此问题的修补程序或补丁?有没有人有另一种解决方法?

解决方案

请允许我再添加一个注释;虽然我不知道它是否有意义。从我原来的帖子开始,我已经看到有这个问题的其他人提到它是在放弃和设计时绑定表单上的数据集之后发生的。这也是在编辑会话之后开始的,我在编辑会话中添加了一个数据集,并在设计时将其绑定到gridview。


I recently began having a problem with a VS 2008 C# project where the primary form will load and paint correctly in the VS Form Designer the first time the project is loaded.   But if I then do a Build, go to the code display, and then return to the form, I get the error "The designer loader did not provide a root component but has not indicated why".   It also says "There is no stack trace or error line information available for this error".

 

I've search these forums for the error, but have only seen it reported for VS2005.   In those instances, the only suggestion was to go thru the generated form code and comment out sections of InitializeComponent() trying to find the error by process of elimination.  My form is a very complex set of nested tabs used as wizards and my InitializeComponent method is nearly 3,000 lines, so I'd love to find another way to approach the problem.

 

Are there any fixes or patches that might affect this?   Does anyone have another way to tackle this?

解决方案

Allow me to add one more note; though I do not know whether it is meaningful.  Since my original post, I've seen others with this problem who mentioned it had happened after dropping and design-time binding a dataset on their forms.   This also began with me after an editing session in which I added a dataset and bound it to a gridview at design time.


这篇关于C#2008设计器加载器没有提供根组件,但没有说明原因的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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