Jun 17, 2010

Retrieving the COM class factory for component with CLSID {BDEADF26-C265-11D0-BCED-00A0C90AB50F} failed due to the following error: 80040154

I got this error while trying to debug a console application accessing SharePoint Portal Server 2010 in Visual Studio 2010.

 Retrieving the COM class factory for component with CLSID {BDEADF26-C265-11D0-BCED-00A0C90AB50F} failed due to the following error: 80040154


Resolution: It is because you are trying to build a x86 application. Go to project properties and set type to x64 everywhere. Then rebuild and debug. The Error Vanishes!

16 comments:

  1. THANK YOU, didn't understand why the code didn't work..

    ReplyDelete
  2. Right click on the ProjectName >> Properties >> Build tab >> Platform target >> Select
    "Any CPU". (By Default, its x86)

    ReplyDelete
  3. It really works. Thanks

    ReplyDelete
  4. This error also occured in my workflow project if I put additional initialization code into the constructor.

    ReplyDelete
    Replies
    1. Thank you Erik (and Bhavyesh)!! I had added code to the workflow constructor...

      Delete
  5. Thanks.It worked great.

    I was having a hard time debugging my service application

    ReplyDelete
  6. Perfect!! Thanks for the solution!

    ReplyDelete
  7. It works. Thanks!

    ReplyDelete
  8. Thank you very much!

    ReplyDelete