The form is visible at runtime, but not at design time.

There are no errors in my project, I can run it through F5, but I can’t look at my "main" forms, because the [Design] tab tells me: "To prevent possible data loss before loading the constructor, the following errors should be resolved: Name class "?" is not a valid identifier for this language. "

But the error list containing this description says so in row 0 and column 0.

Build | A clean solution did not help.

Call stack from the [Design] page:

at Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomParser.CodeTypeDeclarationFromCodeClass(CodeClass vsClass)
at Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomParser.OnNamespacePopulateTypes(Object sender, EventArgs e)
at System.CodeDom.CodeNamespace.get_Types()
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)

UPDATE

Shutting down VS2010 and restarting it resolved.

: http://msdn.microsoft.com/query/dev10.query?appId=Dev10IDEF1&l=EN-US&k=k(WHYDTELPAGE)%3bk(TargetFrameworkMoniker-%22.NETFRAMEWORK%2cVERSION%3dV4.0%22)&rd=true

, ( , VS , ):

" [solutionname].suo, , , .."

+5
3

, . this, ( ), VS2008 , VS2010 .

+3

.

+1

Restarting visual studio 2010 helped, but it probably seems like a mistake.

+1
source

All Articles