Logging to Elasticsearch throws error

Logging to Elasticsearch via nlog framework throws the dependency dll not loaded error. How to upgrade the newtonsoft.json.dll to version 12. Please advise.

2019-10-11 08:52:23.1565 Error Parsing configuration from C:\Users\Suresh Anandhu\AppData\Local\UiPath\app-19.8.0\NLog.config failed. Exception: NLog.NLogConfigurationException: Exception when parsing C:\Users\Suresh Anandhu\AppData\Local\UiPath\app-19.8.0\NLog.config. —> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. —> System.IO.FileLoadException: Could not load file or assembly ‘Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed’ or one of its dependencies. The located assembly’s manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
at NLog.Targets.ElasticSearch.ElasticSearchTarget…ctor()
— End of inner exception stack trace —
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.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)
at System.Activator.CreateInstance(Type type, Boolean nonPublic)
at System.Activator.CreateInstance(Type type)
at NLog.Internal.FactoryHelper.CreateInstance(Type t)
at NLog.Config.Factory2.TryCreateInstance(String itemName, TBaseType& result) at NLog.Config.Factory2.CreateInstance(String name)
at NLog.Config.XmlLoggingConfiguration.ParseTargetWrapper(Dictionary2 typeNameToDefaultTargetParameters, String name, NLogXmlElement childElement, WrapperTargetBase wrapper) at NLog.Config.XmlLoggingConfiguration.ParseTargetElement(Target target, NLogXmlElement targetElement, Dictionary2 typeNameToDefaultTargetParameters)
at NLog.Config.XmlLoggingConfiguration.ParseTargetsElement(NLogXmlElement targetsElement)
at NLog.Config.XmlLoggingConfiguration.ParseNLogElement(NLogXmlElement nlogElement, String filePath, Boolean autoReloadDefault)
at NLog.Config.XmlLoggingConfiguration.ParseTopLevel(NLogXmlElement content, String filePath, Boolean autoReloadDefault)
at NLog.Config.XmlLoggingConfiguration.Initialize(XmlReader reader, String fileName, Boolean ignoreErrors)
— End of inner exception stack trace —
2019-10-11 08:52:23.1565 Warn Failed loading config from C:\Users\Suresh Anandhu\AppData\Local\UiPath\app-19.8.0\NLog.config. Invalid XML?
2019-10-11 08:52:23.1725 Info Found 19 configuration items
2019-10-11 08:52:23.1895 Info Configuration initialized.
2019-10-11 08:52:23.1895 Info NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 4.5.7.7958. Product version: 4.5.7.
2019-10-11 09:24:46.0280 Info Auto loading assembly file: C:\Users\Suresh Anandhu\AppData\Local\UiPath\app-19.8.0\NLog.Targets.ElasticSearch.dll
2019-10-11 09:24:46.0280 Info Loading assembly file: C:\Users\Suresh Anandhu\AppData\Local\UiPath\app-19.8.0\NLog.Targets.ElasticSearch.dll
2019-10-11 09:24:46.0434 Info NLog.Targets.ElasticSearch, Version=1.0.0.0, Culture=neutral, PublicKeyToken=3eb62cd298662c6a. File version: 1.0.0.0. Product version: 1.0.0.
2019-10-11 09:24:46.0434 Info Auto loading assembly file: C:\Users\Suresh Anandhu\AppData\Local\UiPath\app-19.8.0\NLog.Targets.ElasticSearch.dll succeeded!
2019-10-11 09:24:46.0434 Info Message Template Auto Format enabled
2019-10-11 09:24:46.0710 Info Adding target File Target[WorkflowLogFiles]
2019-10-11 09:24:46.0710 Info Adding target EventLog Target[EventLog]
2019-10-11 09:24:46.0818 Error Parsing configuration from C:\Users\Suresh Anandhu\AppData\Local\UiPath\app-19.8.0\NLog.config failed. Exception: NLog.NLogConfigurationException: Exception when parsing C:\Users\Suresh Anandhu\AppData\Local\UiPath\app-19.8.0\NLog.config. —> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. —> System.IO.FileLoadException: Could not load file or assembly ‘Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed’ or one of its dependencies. The located assembly’s manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
at NLog.Targets.ElasticSearch.ElasticSearchTarget…ctor()
— End of inner exception stack trace —
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.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)
at System.Activator.CreateInstance(Type type, Boolean nonPublic)
at System.Activator.CreateInstance(Type type)
at NLog.Internal.FactoryHelper.CreateInstance(Type t)
at NLog.Config.Factory2.TryCreateInstance(String itemName, TBaseType& result) at NLog.Config.Factory2.CreateInstance(String name)
at NLog.Config.XmlLoggingConfiguration.ParseTargetWrapper(Dictionary2 typeNameToDefaultTargetParameters, String name, NLogXmlElement childElement, WrapperTargetBase wrapper) at NLog.Config.XmlLoggingConfiguration.ParseTargetElement(Target target, NLogXmlElement targetElement, Dictionary2 typeNameToDefaultTargetParameters)
at NLog.Config.XmlLoggingConfiguration.ParseTargetsElement(NLogXmlElement targetsElement)
at NLog.Config.XmlLoggingConfiguration.ParseNLogElement(NLogXmlElement nlogElement, String filePath, Boolean autoReloadDefault)
at NLog.Config.XmlLoggingConfiguration.ParseTopLevel(NLogXmlElement content, String filePath, Boolean autoReloadDefault)
at NLog.Config.XmlLoggingConfiguration.Initialize(XmlReader reader, String fileName, Boolean ignoreErrors)
— End of inner exception stack trace —
2019-10-11 09:24:46.0818 Warn Failed loading config from C:\Users\Suresh Anandhu\AppData\Local\UiPath\app-19.8.0\NLog.config. Invalid XML?
2019-10-11 09:24:46.0818 Info Found 19 configuration items
2019-10-11 09:24:46.1038 Info Configuration initialized.
2019-10-11 09:24:46.1038 Info NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 4.5.7.7958. Product version: 4.5.7.