serilog / serilog-extensions-logging

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

Align framework targeting with packages #224

Closed multiarc closed 9 months ago

multiarc commented 1 year ago

Align project targets:

Motivation of this change is to align framework library versions with the corresponding targets.

This is needed to be able to use library in Azure Functions (App Service) environment targeting .NET 6.0 (LTS) runtime.

And netstandard2.0 being a compatibility layer with .NET Framework, effectively targeting .NET 6.0 libraries being emitted in as build results.

This is a part 1 of cumulative change in two repositories. Second one depends on the library itself. Changes are made in a branch: https://github.com/multiarc/serilog-extensions-hosting/tree/targeting/align_framework_targeting_with_packages

nblumhardt commented 1 year ago

Thanks for dropping us a line @multiarc.

The versioning strategy is mentioned in the README: https://github.com/serilog/serilog-extensions-logging#versioning

If you need to avoid MEL v.7, using the previous version of this package (3.1.0) is the way to go.

multiarc commented 1 year ago

Thanks for quick turnaround @nblumhardt.

Strategy is quite simple but doesn't seem to allow any version shift. What version should this update be then?

Additional point for this PR is that you missing .NET 6 version support which is LTS (Long Term Support), while .NET 7 is STS (Short Term Support).

Version 3.1.0 you mentioned doesn't follow your strategy by referencing MEL v2.0, why is that?

Well, regardless of version 3.1.0, I suppose this was meant for use in .NET Core 3.1 but also had references to older libraries. .NET Core 3.1 is phased out, and you missing .NET 6 compatible version, this is primary intent for this PR.

If you would like I can create an issue and link an issue to this PR regarding Azure Functions and runtime incompatibilities.

nblumhardt commented 1 year ago

Thanks for your reply @multiarc.

The versioning strategy for this package changed with v7. It's our first version using the new system, so it's STS.

When .NET 8 comes along in a few more months, we'll release a v8 that covers the new LTS.

v3.1.0 is fully compatible with .NET 6; the MEL v2.0.0 reference will end up resolving to v6.x in most instances on that framework version.

Hopefully Google will find this PR thread when folks look for Azure Functions v6 compat (if not, they'll likely create an issue or Stack Overflow post at that point). Thank you for the offer, and the PR, though!