serilog / serilog-extensions-logging

Serilog provider for Microsoft.Extensions.Logging
Apache License 2.0
307 stars 97 forks source link

add matching Microsoft.Extensions dependency requirement per target net framework #230

Closed Havunen closed 8 months ago

Havunen commented 8 months ago

Fixes https://github.com/serilog/serilog-extensions-logging/issues/229

Numpsy commented 8 months ago

Think this sort of change was already rejected in https://github.com/serilog/serilog-extensions-logging/pull/224

nblumhardt commented 8 months ago

Hi! Thanks for raising these. From 7.0. onwards, n all the packages with versions matching a Microsoft. package, the version policy is to match major and minor version numbers. If you need to target an earlier Microsoft. package, picking the matching earlier version of the Serilog package (or next lowest version, for 6.0. and before) will do what you need.

Closing this as duplicate, but thanks for taking the time to send a PR 👍

Havunen commented 8 months ago

@nblumhardt Ok that makes sense, but why is the latest version then targeting old .NET frameworks? Shouldn't it target only the matching version not to confuse users?

Havunen commented 8 months ago

Maybe this behavior could be documented in the main readme too?

nblumhardt commented 8 months ago

Thanks for your reply. The targeted frameworks match the ones used by Microsoft.Extensions.Logging at the same version (we're using exactly the same dependency and targeting scheme for this package as they do - which is the reason for the current policy). Hope this helps; will check out the README when I have a chance 👍