Microsoft KB Archive/908401

= You may receive an error message when you rebuild a project in Visual Studio Tools =

Article ID: 908401

Article Last Modified on 2/3/2006

-

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:  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:  In the DataSource explorer window, right-click the DataSet object. Click Configure DataSet with Wizard. Add the table back to the DataSet object, and then click Finish.  Save and then close the worksheet in the Visual Studio Designer. Reopen the worksheet in the Visual Studio Designer.</li> Remove the obsolete table adaptor instance from the component tray.</li> Remove or reconfigure the binding source instance in the component tray.</li> Remove the auto-generated code that populates the obsolete table from the Startup event for the worksheet.</li> Save the project.</li> Reconfigure the DataSet object to remove the unwanted table from the DataSet object.</li> Save and then build the project.</li></ol>

<div class="moreinformation_section">

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.
 * 1) Save and then build the project.
 * 2) Delete the Customers ListObject control on Sheet1.
 * 3) Right-click the Northwind DataSet object in the DataSource explorer window, and then click Configure DataSet with Wizard.
 * 4) Click to clear the Customers table check box.
 * 5) Click to clear the Employees table check box.
 * 6) Drag the Employees table onto Sheet1 as a ListObject control.
 * 7) Click Finish, and then rebuild the project.

Keywords: kbtshoot kbprb KB908401

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.