Question Error blocking me from entry into my Dataset designer. Can't find it.

cdognight

Member
Joined
May 17, 2012
Messages
7
Programming Experience
5-10
When I load my project, my dataset designer reports an error, "Object reference not set to an instance of an object", and will not allow me to continue into the designer.

Fine, take me to it and I'll correct it, I guess. The problem is, aside from the link to the MSDN website giving general help on this error, I'm only presented with this call stack, which means nothing to me...

Instances of this error (1)
1. Hide Call Stack
at Microsoft.VisualStudio.Editors.SettingsGlobalObjects.SettingsGlobalObjectProvider.CreateGlobalObjects(Project project)
at Microsoft.VisualStudio.Editors.SettingsGlobalObjects.SettingsGlobalObjectProvider.GetGlobalObjectsCore(Project project, Type baseType)
at Microsoft.VisualStudio.Shell.Design.GlobalObjectProvider.GetGlobalObjects(Project project, Type baseType)
at Microsoft.VisualStudio.Shell.Design.GlobalObjectService.GetGlobalObjects(Type baseType)
at Microsoft.VSDesigner.VSDesignerPackage.AppSettingsHelper.GetGlobalObjectCollection(IServiceProvider serviceProvider, Project project)
at Microsoft.VSDesigner.VSDesignerPackage.AppSettingsHelper.AddAppSettingsConnections(IServiceProvider serviceProvider, Project project, IList connections)
at Microsoft.VSDesigner.VSDesignerPackage.GlobalConnectionService.Microsoft.VSDesigner.VSDesignerPackage.IGlobalConnectionService.GetConnections(IServiceProvider serviceProvider, Project project)
at Microsoft.VSDesigner.DataSource.DesignConnection.GetConnectionFromAppSettings(String objectName, String propertyName, Project currentProject)
at Microsoft.VSDesigner.DataSource.DesignConnection.GetConnectionStringObject(Project targetProject)
at Microsoft.VSDesigner.DataSource.DesignConnection.get_ConnectionStringObject()
at Microsoft.VSDesigner.DataSource.DbSource.set_Connection(IDesignConnection value)
at Microsoft.VSDesigner.DataSource.DesignDataSource.SetConnectionProperty(Source source)
at Microsoft.VSDesigner.DataSource.DesignDataSource.ReadXmlSchema(DataSourceXmlTextReader xmlReader)
at Microsoft.VSDesigner.DataSource.DesignDataSource.ReadXmlSchema(TextReader textReader, String baseURI)
at Microsoft.VSDesigner.DataSource.Designer.DataSourceSerializationService.DeserializeToDataSource(String filePath, Object serializationData)
at Microsoft.VSDesigner.DataSource.ProjectDataSourceDescriptor.LoadDataSource()
at Microsoft.VSDesigner.DataSource.ProjectDataSourceDescriptor.Init(IServiceProvider provider, IVsHierarchy primaryHierarchy, UInt32 primaryItemId, Object primaryDocDataObject, UInt32 docCookie, IVsInvisibleEditor invisibleEditor, IDesignerHost host)
at Microsoft.VSDesigner.DataSource.ProjectDataSourceStorage.EnsureInvisibleEditor(ProjectItem dsProjectItem, Boolean ensureWritable, Boolean createInvisibleEditor, Boolean getUIInfo)
at Microsoft.VSDesigner.DataSource.ProjectDataSourceStorage.GetDataSourceInternal(Object caller, ProjectItem dsProjectItem, Boolean ensureWritable, Boolean createInvisibleEditor, Boolean getUIInfo)
at Microsoft.VSDesigner.DataSource.Designer.DataSourceDesignerLoader.HandleLoad(IDesignerSerializationManager serializationManager)


There's no link, that I can tell, to the offending code. If I open the error list, I have a warning matching the "Object reference not set to an instance of an object" error, but double-clicking it takes me nowhere. The Line and Column fields on the warning are both zero, and the File and Project fields are both empty. I'm not sure what to do here. My application builds and runs fine, but I have no access to my data designer at all. The auto-generated code has about 5k lines, and I'm not about to go combing through it, mostly because I suspect the error isn't even there. I'm still newish to VB.net and this designer stuff. What I do know is seemingly every time I make a modification in a designer GUI, the auto-generated code ends up leaving something orphaned, and I have had one instance where VB got pissed about something I changed in a GUI and decided to totally wipe out everything I'd worked on. So, I'm leery about touching anything.

Btw, vs 2010
 
My usual advice: reinstall Visual Studio now rather than waste time trying to track down the error only to find that you have to reinstall anyway.
 
I find sometimes deleting the auto-generated code files and forcing Visual Studio to regenerate the code sometimes fixes the problem.
 
Thanks, Paszt, that seems to have done the trick. I wasn't even aware that you could do that, thinking only incremental changes to the code were made as the designer was altered.
 

Latest posts

Back
Top