Creation of automation objects in Nav 2016

Hi everyone, I have created an automation object in a code unit that calls a dll file, when I run it with Nav Client 2016 I get an error and the details below as taken from event viewer, may someone kindly help me.
I have registered my dll file successfully using dev shell bt it still says its not registered as shown below

Server instance: NRGTYNWALD
Tenant ID: default
Session type: RoleTailoredClient
Session ID: 246
User:
Type: Microsoft.Dynamics.Nav.Types.Exceptions.NavNCLAutomationCreateException
SuppressMessage: False
SuppressExceptionCreatedEvent: False
FatalityScope: None
Message: Unable to create an instance of Automation Server AutomationObj.dll with CLSID = 41e646b3-f65c-4d8e-8539-499fa56c7076 Retrieving the COM class factory for component with CLSID {41E646B3-F65C-4D8E-8539-499FA56C7076} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))..
StackTrace:
     at Microsoft.Dynamics.Nav.Service.ServiceCall.GetClientReturnValue(Action invokeCallback)
     at Microsoft.Dynamics.Nav.Service.NSClientCallback.CreateAutomationObject(Guid classId, String licenseKey, Boolean newServer)
     at Microsoft.Dynamics.Nav.Runtime.NavAutomation.Create(DataError errorLevel, Boolean newServer, Boolean clientSide)
Source: Microsoft.Dynamics.Nav.Service
HResult: -2146233088
----------------------------------
Type: Microsoft.Dynamics.Nav.Types.Exceptions.NavNCLAutomationCreateException
SuppressMessage: False
SuppressExceptionCreatedEvent: False
FatalityScope: None
Message: Unable to create an instance of Automation Server AutomationObj.dll with CLSID = 41e646b3-f65c-4d8e-8539-499fa56c7076 Retrieving the COM class factory for component with CLSID {41E646B3-F65C-4D8E-8539-499FA56C7076} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))..
StackTrace:
     at Microsoft.Dynamics.Nav.Client.AutomationHandler.CreateAutomationObjectCore(Guid classId, String licenseKey, Boolean newServer)
     at Microsoft.Dynamics.Nav.Client.AutomationHandlerBase.CreateAutomationObject(Guid classId, String licenseKey, Boolean newServer)
     at Microsoft.Dynamics.Nav.Client.ServiceClientCallback.<>c__DisplayClass33.<CreateAutomationObject>b__32()
     at Microsoft.Dynamics.Nav.Client.ServiceClientCallback.<>c__DisplayClass1.<RunClientRequest>b__0()
     at Microsoft.Dynamics.Nav.Client.ServerInvocationManager.DoClientRequestAndCatch(Action clientRequest, Action`1 sendToServerIfNotFaulted)
Source: Microsoft.Dynamics.Nav.Client.WinForms
HResult: -2146233088
----------------------------------
Type: System.Runtime.InteropServices.COMException
ErrorCode: -2147221164
Message: Retrieving the COM class factory for component with CLSID {41E646B3-F65C-4D8E-8539-499FA56C7076} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)).
StackTrace:
     at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck)
     at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)
     at System.Activator.CreateInstance(Type type, Boolean nonPublic)
     at System.Activator.CreateInstance(Type type)
     at Microsoft.Dynamics.Nav.Types.NavAutomationHelper.CreateAutomationObject(Guid classId, String licenseKey, Boolean newServer)
     at Microsoft.Dynamics.Nav.Client.AutomationHandler.CreateAutomationObjectCore(Guid classId, String licenseKey, Boolean newServer)
Source: mscorlib
HResult: -2147221164

Related