fullscale180 / slab-sinks

Semantic Logging Application Block Sinks
Apache License 2.0
13 stars 9 forks source link

could not load file or assembly 'Newtonsoft.Json' #12

Open Tybielee opened 8 years ago

Tybielee commented 8 years ago

I am using the in process semantic logging to connect to an Elasticsearch cluster. However, I am getting this error:

Could not load file or assembly 'Newtonsoft.Json, Version=4.5.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)

There is no reference to 4.5.0.0 in any of my configuration files and I have tried removing the NuGet package EnterpriseLibrary.SemanticLogging.Elasticsearch and installing Newtonsoft.Json prior to installing the Elasticsearch package but I am still hampered with this error. I am in fact using Newtonsoft.Json 6.0.4 My app.config is image

The packages config file also contains the line

The StackTrace shows that it occurs on the line: FullScale180.SemanticLogging.ElasticsearchLog.LogToElasticsearch(IObservable1 eventStream, String instanceName, String connectionString, String index, String type, Boolean flattenPayload, Nullable1 bufferingInterval, Nullable1 onCompletedTimeout, Int32 bufferingCount, Int32 maxBufferSize, Dictionary2 globalContextExtension)

Do you have any advice on what could be causing this problem? I should note that this is in a solution with other projects that use Newtonsoft.Json as well but those use version 6.0.4 and prior to adding in the call to the LogToElasticsearch the program runs and if I comment out that line of code the program runs fine.

Thanks in advance!