Showing posts with label VS2012. Show all posts
Showing posts with label VS2012. Show all posts

Tuesday, 16 April 2013

Retrieving the COM class factory for component with CLSID {} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)).


Problem:

 You face the below error message while building a project in the Visual Studio



Solution:

  1. Go to Solution Explorer of the project in the Visual Studio IDE.
  2. Right click the project.
  3. Choose Properties. (Or press Alt+Enter after left click the project in Solution Explorer)
  4. Go to Build tab.
  5. Choose x64 in the Platform target drop down list box
  6. Rebuild the project.


Interop type cannot be embedded. Use the applicable interface instead

Problem:

  If you face the below error message in Visual Studio



Solution:

  1. Go to References in the Solution Explorer
  2. Right click the .dll file which give the error (in the above image zkemkeeper is the referred dll)
  3. Choose properties.
  4. Change Embed Interop Types to False.