serilog-contrib / serilog-sinks-slackclient

Slack Sink for Serilog
Apache License 2.0
27 stars 15 forks source link

Unregistered requirement on old version of FSharp.Data (2.4.2) #16

Open davidnmbond opened 5 years ago

davidnmbond commented 5 years ago

There is currently a dependency in the nuget package on an old version of FSharp.Data. Firstly, this dependency is not pulled in by Nuget in Visual Studio 2019, Then, once installed and unless FSharp.Data downgrades to v2.4.2, a runtime error is thrown when a slack message is sent:

2019-05-27T14:34:20.7612243Z Caught exception while emitting to sink Serilog.Core.Sinks.RestrictedSink: System.MissingMethodException: Method not found: 'System.String FSharp.Data.Http.RequestString(System.String, Microsoft.FSharp.Core.FSharpOption`1<Microsoft.FSharp.Collections.FSharpList`1<System.Tuple`2<System.String,System.String>>>, Microsoft.FSharp.Core.FSharpOption`1<System.Collections.Generic.IEnumerable`1<System.Tuple`2<System.String,System.String>>>, Microsoft.FSharp.Core.FSharpOption`1<System.String>, Microsoft.FSharp.Core.FSharpOption`1<FSharp.Data.HttpRequestBody>, Microsoft.FSharp.Core.FSharpOption`1<System.Collections.Generic.IEnumerable`1<System.Tuple`2<System.String,System.String>>>, Microsoft.FSharp.Core.FSharpOption`1<System.Net.CookieContainer>, Microsoft.FSharp.Core.FSharpOption`1<Boolean>, Microsoft.FSharp.Core.FSharpOption`1<System.String>, Microsoft.FSharp.Core.FSharpOption`1<Microsoft.FSharp.Core.FSharpFunc`2<System.Net.HttpWebRequest,System.Net.HttpWebRequest>>, Microsoft.FSharp.Core.FSharpOption`1<Int32>)'.
   at SlackClient.SlackClient.SendMessageViaWebhooks(String webhookUri, String message)
   at Serilog.Sinks.Slack.SlackSink.Emit(LogEvent logEvent)
   at Serilog.Core.Sinks.SafeAggregateSink.Emit(LogEvent logEvent) in C:\projects\serilog\src\Serilog\Core\Sinks\SafeAggregateSink.cs:line 39
jezdimirovic commented 3 years ago

Any soluton for this? Anyone?