Reputation: 55
I'm working on a project in visualstudio10 in C#. After I made a form, I've tried to add another one to the project but VS can't open the designer nor create the proper file for the form It just creates a file named "form2.cs" and another named "form2.designer.cs" but it won't open the designer. Instead it response with the following messages: "error during creating 'Namespace provider' " and show me the call stack as follow:
in Microsoft.VisualStudio.CSharp.Services.Language.Interop.IWorld.ConstructNamespace(IntPtr owner, IntPtr baseNodePtr, Boolean noTypeRestrictionInNamespace)
in Microsoft.VisualStudio.CSharp.Services.Language.Interop.WorldExtensions.ConstructNamespaceFromNode(IWorld world, ParseTreeNode context, Boolean noTypeRestriction)
in Microsoft.VisualStudio.CSharp.Services.Language.CodeModel.CFileCodeModel.TryBindType(Compilation compilation, TypeBaseNode typeNode)
in Microsoft.VisualStudio.CSharp.Services.Language.CodeModel.CBasesCollection.IsBaseDefined(Compilation compilation, ParseTreeNode pNode)
in Microsoft.VisualStudio.CSharp.Services.Language.CodeModel.CBasesCollection.Item(Object vtIndex)
in Microsoft.VisualStudio.CSharp.Services.Language.CodeModel.CSlowSnapshot..ctor(CodeElements collection)
in Microsoft.VisualStudio.CSharp.Services.Language.CodeModel.CBasesCollection.CreateSnapshot()
in Microsoft.VisualStudio.CSharp.Services.Language.CodeModel.CCollectionBase.GetEnumerator()
in EnvDTE.CodeElements.GetEnumerator()
in Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomParser.CodeTypeDeclarationFromCodeClass(CodeClass vsClass)
in Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomParser.OnNamespacePopulateTypes(Object sender, EventArgs e)
in System.CodeDom.CodeNamespace.get_Types()
in Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomParser.Parse(TextReader codeStream)
in Microsoft.VisualStudio.Design.Serialization.CodeDom.MergedCodeDomParser.System.CodeDom.Compiler.ICodeParser.Parse(TextReader stream)
in System.CodeDom.Compiler.CodeDomProvider.Parse(TextReader codeStream)
in Microsoft.VisualStudio.Shell.Design.Serialization.CodeDom.CodeDomDocDataAdapter.get_CompileUnit()
in Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager serializationManager)
in Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomDesignerLoader.DeferredLoadHandler.Microsoft.VisualStudio.TextManager.Interop.IVsTextBufferDataEvents.OnLoadCompleted(Int32 fReload)
Any help would be appreciate...
sry: I just add the default namespace in the project properties and everything gone right...
Upvotes: 0
Views: 3659
Reputation: 55
Just add the default namespace in the project properties and recreate the form, or add a namespace in the code for that particular form.
Upvotes: 1
Reputation: 1
Make sure to delete the form you created before you edit the namespace as well. or you will keep getting the error.
Upvotes: 0