Could not load type 'Serilog.Sinks.Splunk.EventCollectorSink' from assembly 'Serilog.Sinks.Splunk, Version=3.6.0.0, Culture=neutral, PublicKeyToken=24c2f752a8e58a10' because the parent type is sealed.
I thought this was a case of "dll hell, .NET style", but no: when I look at the source code of EventCollectorSink, it seems to inherit from PeriodicBatchSink, but that type is sealed.
It turns out that we also reference Serilog.Sinks.Seq, which in turn references Serilog.Sinks.PeriodicBatching version 4.0.0, which is the version that has the sealed type. The latest version of Serilog.Sinks.PeriodicBatching that has the unsealed type is version 2.3.1... so we need to make sure we don't reference a package that transitively references a later version.
For Serilog.Sinks.Seq, this seems to be version 5.1.1
I've made a PR (see below) but this has not been thoroughly tested. Feedback welcome.
When referencing:
I have the following message when starting:
I thought this was a case of "dll hell, .NET style", but no: when I look at the source code of EventCollectorSink, it seems to inherit from PeriodicBatchSink, but that type is
sealed
.It turns out that we also reference
Serilog.Sinks.Seq
, which in turn referencesSerilog.Sinks.PeriodicBatching
version 4.0.0, which is the version that has the sealed type. The latest version ofSerilog.Sinks.PeriodicBatching
that has the unsealed type is version 2.3.1... so we need to make sure we don't reference a package that transitively references a later version.For
Serilog.Sinks.Seq
, this seems to be version5.1.1
I've made a PR (see below) but this has not been thoroughly tested. Feedback welcome.