serilog-contrib / serilog-sinks-splunk

A Serilog sink that writes to Splunk
https://splunk.com
Apache License 2.0
46 stars 47 forks source link

PackageReference for Serilog & System.Net.Http Only Applied to netstandard1.3 #104

Closed BrettJaner closed 5 years ago

BrettJaner commented 5 years ago

In the Serilog.Sinks.Splunk.csproj, the PackageReference for Serilog & System.Net.Http is only applied to netstandard1.3

<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard1.3' ">
    <PackageReference Include="Serilog" Version="2.6.0" />
    <PackageReference Include="System.Net.Http" Version="4.3.3" />
</ItemGroup>

<ItemGroup>
    <PackageReference Include="Serilog.Sinks.PeriodicBatching" Version="2.1.1" />
</ItemGroup>

Then in my NET45 application where I'm consuming the Serilog.Sinks.Splunk package targeting netstandard1.1, it pulls in Serilog v2.0.0 because that is the version Serilog.Sinks.PeriodicBatching is referencing. System.Net.Http is left out. However, all still compiles so maybe System.Net.Http package reference isn't required? Or maybe it's just because I'm on .NET Framework and there is a framework assembly for System.Net.Http?

Also, there was a pull request to remove the System.Net.Http package reference for .NET Framework applications #77 a while back. If they update to Serilog.Sinks.Splunk to v3.0.0, won't they now be broken?

BrettJaner commented 5 years ago

After doing some more research in the area, I've added a pull request to help facilitate the conversation. No pressure to merge :)

merbla commented 5 years ago

Thanks @BrettJaner!

A new package Serilog.Sinks.Splunk.3.1.0-dev-00229.nupkg should be available soon on NuGet to test out these changes.

BrettJaner commented 5 years ago

Perfect! I'm out of the office until Monday. Should be able to find time to test these changes out then and will report back.

BrettJaner commented 5 years ago

@merbla Everything looks good on my end!

merbla commented 5 years ago

@BrettJaner 3.1 is out on NuGet.