SharePoint 2010 Iterating Sites–COM Factory Error




- April 20, 2015

Rest of the Story:

Platform: Windows 7, 64 bit, .NET 4 Windows App/Console App   Error: Retrieving the COM class factory for component with CLSID {BDEADF26-C265-11D0-BCED-00A0C90AB50F} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)).  

Solution: Your debug configuration must use x64 as its active solution platform.

Otherwise you're going to get a very non-intuitive message like that shown above.  You can change this by picking Configuration Manager from the Build menu or from the Solution Configurations drop down menu in your toolbar. Make sure the Active Solution Platform is not x86.