Thursday, August 25, 2011

Error HRESULT E_FAIL has been returned from a call to a COM component.

Ever opened your aspx or ascx in Visual Studio 2010 only to see this:


When this happens:

  • Editing in design view is virtually impossible
  • Can't add new controls
  • Existing controls can't be edited in design view
The solution that's worked for me is to:

  • Close VS 2010
  • Delete all temporary files created by VS 2010. In addition to the usual suspects, make sure you delete the folder that corresponds to your website in this location: C:\Users\[username]\AppData\Local\Microsoft\WebsiteCache
  • Restart VS 2010