English

Error: COM object with CLSID {} is either not valid or not registered

Error Message

When writing MapObjects code with C#, for example:

Code:
MapObjects2.GeoEvent eventPt = new GeoEventClass();

the following error message may occur:

"COM object with CLSID {} is either not valid or not registered".

Cause

This is not a class that can be created.

Solution or Workaround

Do not use the new keyword to create the class.

Code:
MapObjects2.GeoEvent eventPt;