VS 2010 designer error when loading typed dataset: To prevent possible data loss before loading the designer, the following errors must be resolved

Have you ever encountered this error when trying to open a typed dataset (.xsd) in Visual Studio 2010:

To prevent possible data loss before loading the designer, the following errors must be resolved: 
Object reference not set to an instance of an object.

VSErrorLoadingTypedDataset

The cause of this error is the .xsc file under the typed dataset is corrupted or damaged. If you expand the typed dataset in Solution Explorer, you will see the file:

VSSolutionExplorer

To fix the error, you need to first close the error window as above, then delete the .xsc file, then double-click the typed dataset file (.xsd), the designer will recreate a blank .xsc file so the .xsd file can be opened.

Is there any risk when deleting the .xsc file? No, according to Microsoft: http://social.msdn.microsoft.com/Forums/en-US/xmlandnetfx/thread/d3319c6d-0786-4013-adf6-e746358f9212/

Leave a Reply

avatar
  Subscribe  
Notify of