重新启动计算并打开简单的桌面项目后,我发现错误To prevent possible data loss before loading the designer, the following errors must be resolved:
调用堆栈:
at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
at Microsoft.VisualStudio.NativeMethods.ThrowOnFailure(Int32 hr, Int32[] expectedHRFailure)
at Microsoft.VisualStudio.Shell.Design.Serialization.DesignerDocDataService.GetFileDocData(String fileName, FileAccess access, String createTemplate, Boolean addToHostList, Boolean nestedItem)
at Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomProvider.OnParseBegin(TextReader reader)
at Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomParser.Parse(TextReader codeStream)
at Microsoft.VisualStudio.Design.Serialization.CodeDom.MergedCodeDomParser.System.CodeDom.Compiler.ICodeParser.Parse(TextReader stream)
at System.CodeDom.Compiler.CodeDomProvider.Parse(TextReader codeStream)
at Microsoft.VisualStudio.Shell.Design.Serialization.CodeDom.CodeDomDocDataAdapter.get_CompileUnit()
at Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager serializationManager)
at System.ComponentModel.Design.Serialization.BasicDesignerLoader.BeginLoad(IDesignerLoaderHost host)
如何应对此类错误并带回我的表单设计者?
答案 0 :(得分:1)
您必须删除了某些内容,并且必须将其从设计器中删除。如果您已执行删除操作,请转到设计器页面并从此处将其删除。比起是否要再次添加控件,您可以在此操作之后添加它