我有一个基于WinForms的应用程序。它的编译和运行非常完美。 问题是,从昨天开始,我无法打开主窗体的设计器文件。
起初我以为这是由于我添加以下电话:设计器在VS 2008上加载c#/ .Net 3.5的错误
StyleManager.Load("some isl file");
我删除它,我解开了更改文件,并没有什么。
我得到的错误是来自XmlDocument.LoadXml()
调用的“根元素丢失”。源是实际尝试加载xml文件的方法,但只在运行时才这样做。
如果我忽略此消息,我会得到一个“对象引用未设置为对象的实例”的错误,并且通过忽略这一点,我会得到“设计器已经加载”。
更新
如果我注释掉的应该读取XML(在InitializeComponent()
)方法的代表登记,不发生问题。
我们在我们的解决方案中使用Infragistics,并在堆栈跟踪中提及它们。
在System.Xml.XmlTextReaderImpl.Throw(例外五) 在System.Xml.XmlTextReaderImpl.ThrowWithoutLineInfo(字符串RES) 在System.Xml.XmlTextReaderImpl.ParseDocumentContent() 在System.Xml.XmlTextReaderImpl。阅读() 在System.Xml.XmlLoader.Load(DOC的XmlDocument,XmlReader中的读者,布尔preserveWhitespace) 在System.Xml.XmlDocument.Load(XmlReader中读取) 在System.Xml.XmlDocument.LoadXml(字符串XML) 在MyApp.Utilities.Xml.Load(String str) at Editor.Editor.tabFlowView_ActiveTabChanged(Object sender,ActiveTabChangedEventArgs e) at Inf ragistics.Win.UltraWinTabControl.UltraTabControlBase.OnActiveTabChanged(ActiveTabChangedEventArgs E) 在Infragistics.Win.UltraWinTabControl.UltraTabControlBase.RaiseEvent(UltraTabControlEventId ID,EventArgs的) 在Infragistics.Win.UltraWinTabControl.UltraTabControlBase.set_ActiveTab(UltraTab值) 在Infragistics的。 Win.UltraWinTabControl.UltraTabControlBase.OnManagerSelectedTabItemChanging(对象发件人,SelectedTabItemChangingEventArgs E) 在Infragistics.Win.UltraWinTabs.TabManager.set_SelectedTabItem(ITabItem值) 在Infragistics.Win.UltraWinTabControl.UltraTabControlBase.SetSelectedTab(UltraTab标签) 在Infragistics.Win。 Infragistics.Win.UltraWinTabControl.UltraTabControlBase上的UltraWinTabControl.UltraTabControlBase.PerformAction(UltraTabControlAction actionCode) .PerformDelayedInitialize() 在Infragistics.Win.UltraWinTabControl.UltraTabControlBase.OnCreateControl() 在System.Windows.Forms.Control.CreateControl(布尔fIgnoreVisible) 在System.Windows.Forms.Control.CreateControl(布尔fIgnoreVisible) 在系统.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible) at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible) at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible) at System.Windows.Forms。 Control.CreateControl(Boolean fIgnoreVisible) at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible) at System.Windows.Forms.Control.CreateControl() at System.Windows.Forms.Control。ControlCollection.Add(控制值) 在System.Windows.Forms.Form.ControlCollection.Add(控制值) 在System.Windows.Forms.Design.ControlDesigner.DesignerControlCollection.Add(对照C)
我把它调用XML有关装载的是你自己设计的呢? – 2011-02-16 09:42:39