“Type ‘DataSetName’ is not defined” error message when you build the project
Symptoms
When you create a DataSet during design time by using the Generate DataSet option of a DataAdapter, an instance of the DataSet is automatically created on the form. When you modify the name of the DataSet in the Properties window, save the project, and then try to open the form, you may receive the following error message on the form:
An error occurred while loading the document. Fix the error, and then try loading the document again. The error message follows:
Unspecified errorWhen you build your project, you may receive the following error message:
Type ‘ApplicationName.OldDataSetName’ is not defined.
Resolution
The problem occurs because when the DataSet name is changed in the DataSet schema file (.xsd), Microsoft Visual Studio 2005 or Microsoft Visual Studio .NET does not modify the DataSet name in the InitializeComponent of the form where the DataSet is initialized.

Leave a Reply