You may receive an error message when you rebuild a project in Visual Studio Tools (908401)



The information in this article applies to:

  • Microsoft Visual Studio Tools for the Microsoft Office System version 2003



SYMPTOMS

When you rebuild a project in Microsoft Visual Studio Tools for the Microsoft Office System, you may receive an error message. This problem occurs when the following conditions are true:
  • The project contains or contained a table that was created by using a DataSet object.
  • You reconfigure the DataSet object after the first time that you build the project.
The error message is similar to the following:
Designer failed to load correctly. Do not use the designer to work on the document until you have fixed any errors in the Error list, and then closed and reopened the designer. Working with control or attempting to use designer features will result in more errors being generated.

WORKAROUND

To work around this problem, follow these steps:
  1. If the project no longer contains the table that was created by using a DataSet object, reconfigure the DataSet object to re-create the table that was removed. To do this, follow these steps:
    1. In the DataSource explorer window, right-click the DataSet object.
    2. Click Configure DataSet with Wizard.
    3. Add the table back to the DataSet object, and then click Finish.
  2. Save and then close the worksheet in the Visual Studio Designer.
  3. Reopen the worksheet in the Visual Studio Designer.
  4. Remove the obsolete table adaptor instance from the component tray.
  5. Remove or reconfigure the binding source instance in the component tray.
  6. Remove the auto-generated code that populates the obsolete table from the Startup event for the worksheet.
  7. Save the project.
  8. Reconfigure the DataSet object to remove the unwanted table from the DataSet object.
  9. Save and then build the project.

MORE INFORMATION

Steps to reproduce the problem

  1. Create a new Visual Studio Tools for Office Excel Workbook project by using Microsoft Visual Basic or Microsoft Visual C#.
  2. Add a new DataSource object, point to the Northwind database, and then click the Customers table.
  3. Drag the Customers table onto Sheet1 to create a ListObject control.

    Note A CustomersTableAdapter object and a CustomersBindingSource object are added to the component tray.
  4. Save and then build the project.
  5. Delete the Customers ListObject control on Sheet1.
  6. Right-click the Northwind DataSet object in the DataSource explorer window, and then click Configure DataSet with Wizard.
  7. Click to clear the Customers table check box.
  8. Click to clear the Employees table check box.
  9. Drag the Employees table onto Sheet1 as a ListObject control.
  10. Click Finish, and then rebuild the project.

Modification Type:MinorLast Reviewed:2/3/2006
Keywords:kbtshoot kbprb KB908401 kbAudDeveloper