How to solve COM Exception Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))?

Jaswant Agarwal picture Jaswant Agarwal · Sep 30, 2009 · Viewed 282.5k times · Source

When I try to create a instance of a COM class it throws an exception as

Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))

Please suggest how could i solve it?

Answer

Andy Fiedler picture Andy Fiedler · Feb 28, 2012

You need to make sure all of your assemblies are compiling for the correct architecture. Try changing the architecture for x86 if reinstalling the COM component doesn't work.