Reputation: 10247
My project has no errors, I'm able to run it via F5, but I can't look at my "main" form, as the [Design] tab tells me, "To prevent possible data loss before loading the designer, the following errors must be resolved: The class name "?" is not a valid identifier for this language."
But the Error List that contains that Description says it's at Line 0 and Column 0.
Build | Clean Solution did not help.
The Call Stack from the [Design] page is:
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)
A shutdown of VS2010 and restart solved it.
I found a few suggestions, including this one (but I didn't need to try it, as making VS go to its room for a minute or two before coming back out worked):
"delete the [solutionname].suo file which contains designer layout info from your previous session, then start the project and rebuild.."
Upvotes: 6
Views: 5676
Reputation: 1106
Restarting visual studio 2010 did the trick for me, it surely seems like a bug though.
Upvotes: 1