Geeks With Blogs
CodeCanvas .Net Vijay shankar ganesh on everything (well, almost) tech

Original post at my blog

As if usual problems arent complex enough my Visual Studio 2005 stopped displaying DataSet's that were designed and were working very recently. When I open my visual studio solution / project which already has an DataSet open I will get the following error dialog


[
Load DataSet Error
Failed to load dataset because of the following error:

Value cannot be null.
Parameter name: project
]

and the following error message

 

One or more errors encountered while loading the designer. The errors are listed below. Some errors can be fixed by rebuilding your project, while others may require code changes.


Value cannot be null. Parameter name: project

Hide    


at Microsoft.VSDesigner.VSDesignerPackage.GlobalConnectionService.Microsoft.VSDesigner.VSDesignerPackage.IGlobalConnectionService.GetConnections(IServiceProvider serviceProvider, Project project)
at Microsoft.VSDesigner.DataSource.DesignConnection.GetConnectionFromAppSettings(String objectName, String propertyName)
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)
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)
at Microsoft.VSDesigner.DataSource.ProjectDataSourceStorage.GetDataSourceInternal(Object caller, ProjectItem dsProjectItem, Boolean ensureWritable, Boolean createInvisibleEditor)
at Microsoft.VSDesigner.DataSource.Designer.DataSourceDesignerLoader.HandleLoad(IDesignerSerializationManager serializationManager)

Occording to SOP, first I closed the dataset file (xsd) and tried opening it again in the editor, at which time I would get another error message in the following format:


[
Load DataSet Error
Failed to load dataset because of the following error:

Object reference not set to an instance of an object
]

and the following error message

 

One or more errors encountered while loading the designer. The errors are listed below. Some errors can be fixed by rebuilding your project, while others may require code changes.


Object reference not set to an instance of an object.

Hide    


at Microsoft.VisualStudio.DataTools.Providers.OleDB.OleDBUtilities.GetRegisteredProviders()
at Microsoft.VisualStudio.DataTools.Providers.OleDB.OleDBUtilities.ExpandProvider(String provider)
at Microsoft.VisualStudio.DataTools.Providers.OleDB.OleDBUtilities.GetDataSource(String provider)
at Microsoft.VisualStudio.DataTools.Providers.OleDB.OleDBDataSourceSpecializer.DeriveDataSource(String connectionString)
at Microsoft.VisualStudio.DataTools.DataServices.DataProvider.DeriveDataSource(String connectionString)
at Microsoft.VSDesigner.Data.ProviderManager.GetVsDataSource(String invariantName, String connectionString, Boolean encrypted)
at Microsoft.VSDesigner.Data.ConnectionString..ctor(String providerName, String connectionString)
at Microsoft.VSDesigner.VSDesignerPackage.AppSettingsHelper.GetConnectionsViaDataEnvironment(IDataEnvironment dataEnvironment)
at Microsoft.VSDesigner.VSDesignerPackage.GlobalConnectionService.Microsoft.VSDesigner.VSDesignerPackage.IGlobalConnectionService.GetConnections(IServiceProvider serviceProvider, Project project)
at Microsoft.VSDesigner.DataSource.DesignConnection.GetConnectionFromAppSettings(String objectName, String propertyName)
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)
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)
at Microsoft.VSDesigner.DataSource.ProjectDataSourceStorage.GetDataSourceInternal(Object caller, ProjectItem dsProjectItem, Boolean ensureWritable, Boolean createInvisibleEditor)
at Microsoft.VSDesigner.DataSource.Designer.DataSourceDesignerLoader.HandleLoad(IDesignerSerializationManager serializationManager)

On the quest to solve this headache I hit google and came up with the following pages which kind of had content related to the problem:

http://www.darrellhawley.com/2006/05/value-cannot-be-null-parameter-name.html - He was lucky to have the problem sorted out on the first step of SOP, but as you know our problems never are that easy to solve, are they? :)

http://www.kbalertz.com/kbNamed_894438/Describes.problem.that.occurs.Microsoft.Visual.Studio.When.open.project.that.contains.inherited.user.receive.error.aspx - Even though this page had a similar error message tackled, it was not the same as the current one.

Then finally hit on this forum post http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=133896&SiteID=1 it is quite long (4 pages), but was worth it. After a to and forth conversation which spanned 3 pages Stephen Provine had nailed the problem to a missing registry key value.

The culprit was Windows Live Safety Scanner - "Clean Up Scan", yup! the safety centre had cleaned out the unwanted registry keys, which is usually good for the system in most cases but this time it was not one of those "most" cases.

To fix the problem please follow the following steps:

To examine the registry:

1) Run regedit.exe;
2) Browse to the location "HKEY_CLASSES_ROOT\CLSID\{F9AE8980-7E52-11d0-8964-00C04FD611D7}" in the tree;
3) If there is a child node in the tree called "ProgID", then you are indeed experiencing a different problem - let me know if this is the case.

Otherwise, follow these steps to modify the registry:

1) Right click the node and select "New > Key";
2) Enter "ProgID" as the name;
3) Go to the main window and double click "(Default)";
4) Enter the value "MSIDXS.1";

Now if you run Visual Studio, it should be working.

Hope this helps out a fellow developer who is on his way to becoming a hairless monk!

Update: Because of the use of tables and stylesheets the article was not showing up properly, now I have fixed them and updated the post, hopefully this works good.

Posted on Sunday, May 21, 2006 11:50 AM DotNet , Self References | Back to top


Comments on this post: The One with the Bad DataSet/XSD day

# Problem with Dataset designer
Requesting Gravatar...
This problem is caused due to a missing registry entry, please do check out...
Left by on May 22, 2006 11:59 AM

# re: The One with the Bad DataSet/XSD day
Requesting Gravatar...
You are a lifesaver! I got bit by this same thing. Shoulda known not to trust MS to clean up their own OS (gd&r)
Left by Randy Jean on Feb 21, 2007 3:35 AM

# re: The One with the Bad DataSet/XSD day
Requesting Gravatar...
I encountered similar problem but, I DO HAVE the registry key :-(.
So.....what might be it ?
If you do know, please share it with me.
Thank you.

regards
Hari
Left by Hari on Jun 12, 2007 12:39 AM

# re: The One with the Bad DataSet/XSD day
Requesting Gravatar...
I have same problem but do have the propid key already. Vista bites... Not ready for prime time for developers...
Left by wayne dehart on Jun 15, 2007 9:32 AM

# re: The One with the Bad DataSet/XSD day
Requesting Gravatar...
Same here... registry key is fine, DataSet is down.
Left by Marie on Jul 17, 2007 1:24 PM

# re: The One with the Bad DataSet/XSD day
Requesting Gravatar...
See:
http://www.darrellhawley.com/2006/05/value-cannot-be-null-parameter-name.html

if your projects builds, and only shows that message on project-load, then probably you had your dataset opened when you exited VS. Close your dataset-file and shut down VS, reopen VS and the error is gone, at least here.
Just annoying, not critical!
Left by Reinhard Sacher on Aug 24, 2007 5:21 AM

# re: The One with the Bad DataSet/XSD day
Requesting Gravatar...
As if usual problems arent complex enough my Visual Studio 2005 stopped displaying DataSet's that were designed and were working very recently. When I open my visual studio solution / project which already has an DataSet open I will get the following error dialog:
Failed to load dataset because of the following error
Clé non valide pour l'utilisation dans l'état spécifié


Left by Clé non valide pour l'utilisatio on Aug 27, 2007 12:58 PM

# re: The One with the Bad DataSet/XSD day
Requesting Gravatar...
To examine the registry:

1) Run regedit.exe;
2) Browse to the location "HKEY_CLASSES_ROOT\CLSID\{F9AE8980-7E52-11d0-8964-00C04FD611D7}" in the tree;
3) If there is a child node in the tree called "ProgID", then you are indeed experiencing a different problem - let me know if this is the case.

i can find a ProgId in my registry,so what can be the solution for this..Can u favour me.Many thanks

Yvette
Left by yvette on Aug 28, 2007 10:14 PM

# re: The One with the Bad DataSet/XSD day
Requesting Gravatar...
Thank You, thank you! Adding the ProgID key solved my problem. It was puzzling because I made no changes to the working c# app, but when I opened it today, I got the errors. It was caused by cleaning the registry with WinTools. I don't even know how I would know to put such an obscure key on it's exclude list.
Your blog is really interesting too. I just got SequoiaView.
Have a great day.
Left by rodman on Jan 28, 2008 8:45 PM

# re: The One with the Bad DataSet/XSD day
Requesting Gravatar...
You're the man!!! Works like a charm. I thought my HDD goin bonkers. Thumbs up!!
Left by TJ on May 12, 2008 9:22 PM

# re: The One with the Bad DataSet/XSD day
Requesting Gravatar...
Thank you very much. I knew the problem was from the Windows Live Safety Scanner, but I was lost as to how to fix this. My problem was very similar: every time I opened a project with Data Sources, the IDE would tell me "Load Data Set Error. Object reference not set to an instance of an object." And the data source connection wizard would show "Wizard Form. An unexpected error has occured. Error Message: Object reference not set to an instance of an object." I could view the DataSet designer and I was stuck! Thanks again, adding the registry key solved my problem.
Left by MijaeDjinn on Jul 28, 2008 4:13 PM

# re: The One with the Bad DataSet/XSD day
Requesting Gravatar...
I have this same issue and have the registery key. This fix did not work for me.
Left by Ken on Aug 06, 2008 9:30 AM

# re: The One with the Bad DataSet/XSD day
Requesting Gravatar...
Thank you!!!!
Left by Doug on Aug 08, 2008 3:44 PM

# re: The One with the Bad DataSet/XSD day
Requesting Gravatar...
impecable.. no encontraba solucion, me estaba preparando para reinstalar win.


ss
Left by Eduardo on Jan 08, 2009 5:39 AM

# re: The One with the Bad DataSet/XSD day
Requesting Gravatar...
That's what I am looking for!!! thank you!!
Left by Jim on Feb 13, 2009 1:30 PM

# re: The One with the Bad DataSet/XSD day
Requesting Gravatar...
My Hero!! Every time I tryed to connect to an access database from Visual Basic 2008 (studio). I got a dialog box with only a space for the connection string. Not one connectionString would work.. My error message was (you see I said WAS: "Format of the initialization string does not conform to specifications starting at index 0"
I did everything that I read prior to this post and nothing else worked. I even uninstalled Studio, re-installed and re-downloaded the servuce packs.. NO LUCK..

BUT when I add the ProgID key to the registry, I was in business..

Thank You Thank You Thank You
Left by Mz Gerry on Nov 05, 2009 6:07 AM

# re: The One with the Bad DataSet/XSD day
Requesting Gravatar...
Worked perfectly! Thank you... I was ready to throw my laptop at a wall.
Left by KH on Apr 06, 2010 5:31 PM

# re: The One with the Bad DataSet/XSD day
Requesting Gravatar...
Thank you very much. i search a lot on google but finally find out solution form here. i think i lost registry entry by registry cleaner software.
Left by chirag gurjar on Jul 19, 2012 6:28 AM

Your comment:
 (will show your gravatar)


Copyright © CodeCanvas | Powered by: GeeksWithBlogs.net