Class Not Registered
I wrote a class which was COM-exposed and registered it using RegAsm. It was a 32-bit library on a 32-bit machine, being called by a 32-bit caller. Yet when the calling program tried to make an instance, it got the error “Class not Registered”.
In my case, the error was actually because a dependency of my class was not registered. I registered my dependency and got a different error. In the end, I needed to use a different version of my dependency DLL which other consumers were using, which was pre-registered.
Other things to check
Your class is annotated with
ComVisible and a new, unique GUID which you have generated, which is different to your
AssemblyInfo (you will get build errors if they are the same)
In Project Properties (in Visual Studio) you have set the following:
Application -> Assembly Information -> Make assembly COM-visibleto true
Build -> Register for COM interopto true
Here is a tragic questioner on TekTips who never got an answer to their identical question.