Hello,
I am adding QAction for a protocol and have added Dlls: Newtonsoft.Json.dll;ff-netF48-server-sdk.dll;Microsoft.Extensions.Logging.Abstractions.dll;Microsoft.Extensions.Logging.Configuration.dll;Microsoft.Extensions.Logging.Console.dll;Microsoft.Extensions.Logging.dll;Microsoft.IdentityModel.Logging.dll.
The error I am getting is:
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.MissingMethodException: Method not found: 'Microsoft.Extensions.Logging.ILoggerFactory Microsoft.Extensions.Logging.LoggerFactory.Create(System.Action`1<Microsoft.Extensions.Logging.ILoggingBuilder>)'. at io.harness.cfsdk.client.api.CfClient.SetUpDefaultLogging(Config config) at io.harness.cfsdk.client.api.CfClient..ctor() at io.harness.cfsdk.client.api.CfClient.<>c.<.cctor>b__29_0() at System.Lazy`1.CreateValue() --- End of stack trace from previous location where exception was thrown ---
Hello,
I am trying to run Harness SDK file through QActions in a protocol. I ahve also added Serilog and Serilog.Extensions.Logging dll's but its still showing an error as below:
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.MissingMethodException: Method not found: 'io.harness.cfsdk.client.api.ConfigBuilder io.harness.cfsdk.client.api.ConfigBuilder.LoggerFactory(Microsoft.Extensions.Logging.ILoggerFactory)'. at QAction.Run(SLProtocol protocol) --- End of inner exception stack trace --- at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters) at CManagedScript.Run(CManagedScript* , Int32 iDmaId, Int32 iEid, Int32 trigger, Int32 iCookie, IUnknown* pILog, IUnknown* pProtocol, tagVARIANT* varParameters, tagVARIANT* varRowInfo, tagVARIANT* pvarReturn) InnerException:
FYI: You wrote an answer to your question. This will typically go unnoticed by the community that this is a follow-up question. Try to add comments to your question or comment on other people. Unless you solved your problem and you want to post the answer yourself.
Hi Michiel,
yes, I double checked and the DLL’s versions are aligned with DM versions.
If you are sure that the method should be available in the DLL and you are still seeing this exception, then you can restart the SLScripting process in order (this is one of the processes that can be restarted without DM restart). This should ensure the DLLs are refreshed if there is any update to any of them. If you are still seeing the exception after that, then it means that the DDL loaded does not have the method.
Did you check if the dll’s you’re using in your solution have the correct version as on the DM agent or if there are any other connectors using older versions of those dlls?