"Could not load file or assembly" error after you delete a web part from a customized page on a server that is running SharePoint Foundation 2010 or SharePoint Server 2010

Symptoms

Consider the following scenario:
  • You install a solution that contains a web part on a server that is running Microsoft SharePoint Server 2010 or Microsoft SharePoint Foundation 2010.
  • You use the web part to customize a page.
  • You delete the web part from the customized page.
  • You uninstall the solution from the server.
  • You view the customized page in a web browser.

In this scenario, you receive the following error message:
Could not load file or assembly 'file or assembly information'' or one of its dependencies. The system cannot find the file specified.
Troubleshoot issues with Microsoft SharePoint Foundation.
Correlation ID:
Date and Time: date time

Cause

When the page is customized, the register assembly directive for the web part is embedded at the top of the page markup. However, when the web part is deleted from the customized page, the register assembly directive is not deleted from the markup.

Resolution

To resolve this issue, use one of the following methods:
  • Edit the customized page in SharePoint Designer, and delete the register assembly directive. The register assembly directive starts with "<%@ Register," and it contains the name of the assembly that is referenced in the error message.
  • Reset the customized page to the site definition. Be aware that when you do this, customizations are lost.

Proprietà

ID articolo: 983075 - Ultima revisione: 20 lug 2010 - Revisione: 1

Feedback