Search code examples
c#comregasm

COM: OLE Viewer unable to create instance of class


Using OLE/COM Viewer I get the following error (when expanding my registered class)

CoGetClassObject failed.
<No system message defined> severity: SEVERITY_ERROR, facility:
<Unknown Facility> ($80131522)

The COM Class is a C# class registered with RegAsm.

What does this error mean?

Edit:

See http://www.dotnet247.com/247reference/msgs/24/124704.aspx for similar issue.


Solution

  • Found the problem:

    By looking at the fuslogvw logs I learned that OleViewer looks for any assembly in the same folder as OleViewer.exe that matches the assembly it is looking for (!). By chance I had an old version of my assembly in the folder I was running OleViewer from. So what I had to do was to copy OleViewer.exe to the folder where my assembly was registered. Strange but true!