Closed damianh closed 9 months ago
Hey Damian! Thanks for the notes.
This is something we've previously spent some time grappling with; the Duende approach was what this package used originally, but that also has some downsides as dependency graphs get more complex.
If you're targeting .NET 6 and the v6 dependencies, you will need the 5.0.1 version of this package (since we switched versioning strategies at the .NET 7 release); in the future, whatever major version of Microsoft.Extensions.Hosting you're targeting, you can rely on the same major version of this package being compatible.
Thanks for quick response.
Understood, if that's the approach then I suggest limiting the supported frameworks to just the lasted major TFM only. Because the current version declares compatibility with net6.0 and net7.0, folks using dependabot and ide package managers will be steered to upgrade on net6.0 and net7.0 project which then breaks things on them with incompatible transitive dependencies being pulled in.
I suggest an 8.0.1 package with net8.0 TFM support only and delisting of the 8.0.0 package(s).
Thanks for the follow-up!
The Microsoft.Extensions.* 8.x packages do actually target those downlevel platforms, and some people use them successfully that way; here's the MEL framework support list, which includes essentially the same TFMs as we use here.
https://www.nuget.org/packages/Microsoft.Extensions.Logging
The path Serilog.Extensions. follows is to just do exactly what those packages do, so we don't add or remove any compatibility problems. The trick really is just targeting the the Serilog.Extensions. package versions that match the Microsoft.Extensions.* versions that your app uses.
I can detect that you don't desire making the adjustments here. That's cool, please close 😎
It is a broken experience, but it'll go away for me when my particular apps are on .NET8 (until the same thing happens when .NET9 comes around).
The feedback's definitely welcome - thanks for raising this, all the same 😄. It's an area that's already had a lot of time put into it, chasing different compat problems over the years, so not super keen to reopen the can of worms - but keeping an eye on it 👍
Hello,
Spotted this on https://www.nuget.org/packages/Serilog.Extensions.Hosting
We have a .net6 and .net7 projects that had compilation errors after upgrading to v8 of this library. Specifically things like:
There are likely breaking changes in these MS.Ext packages between major versions so I wouldn't expect v8 versions to be compatible on
net7.0 and net6.0
projects without conflicts (either compile time or runtime).What I would expect to see for a library that tries to be compatible across the major TFM, and have MS.Ext dependencies, would to have such dependencies locked to the major version shipped with that SDK.
For example:
Here is an example project that does it in a way that works: https://www.nuget.org/packages/Duende.AccessTokenManagement and the corresponding csproj: https://github.com/DuendeSoftware/Duende.AccessTokenManagement/blob/main/src/Duende.AccessTokenManagement/Duende.AccessTokenManagement.csproj
Cheers!