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.



Monday, 15 April 2013

The module was loaded but the call to dllregisterserver failed with error code 0x80070005 - Regsvr32

Problem:

  If you face the below error message while using regsvr32:



Solution:

1. Open the Command Prompt as an Adminstrator.
         Click Start, Type Cmd and right click the command prompt and Choose "Run as Administrator"

2. Type Regsvr32 followed by the location for install or
    Type  Regsvr32 -u followed by the location for uninstall
         eg. regsvr32 C:\Windows\SysWOW64\xxx.dll

3. Press Enter.