serilog-settings-appsettings icon indicating copy to clipboard operation
serilog-settings-appsettings copied to clipboard

Use .Net 5 packages?

Open zachrybaker opened this issue 2 years ago • 3 comments

Some poor blokes like me need this code to work well with both net472, netCore3.1 and Net5 (and possibly net6) targets. This package ends up in a large solution and ends up pulling a v4 of System.Configuration.ConfigurationManager. We have another hard requirement for v5 of this package, however, that keeps an app from booting, unless I overwrite this dll on boot with a v5.

I really doubt that there's a hard requirement on the net472 framework's version, right?

zachrybaker avatar Mar 24 '22 18:03 zachrybaker

Otherwise, I think I can probably just explicitly include v5 of System.Configuration.ConfigurationManager in my logging nuget project (not the app, just a wrapping logging project to reduce boilerplate and get things a certain way), and move on.

zachrybaker avatar Mar 24 '22 18:03 zachrybaker

Hi @zachrybaker - would your problem be solved by adding a .NET 5 TFM to https://github.com/serilog/serilog-settings-appsettings/blob/dev/src/Serilog.Settings.AppSettings/Serilog.Settings.AppSettings.csproj ? We've made that change in several other libs so should be no problem pushing through here. Any chance of a PR?

nblumhardt avatar Mar 25 '22 21:03 nblumhardt

I doubt it would in my case only b/c my target is actually netCore3.1.

On Fri, Mar 25, 2022 at 4:04 PM Nicholas Blumhardt @.***> wrote:

Hi @zachrybaker https://github.com/zachrybaker - would your problem be solved by adding a .NET 5 TFM to https://github.com/serilog/serilog-settings-appsettings/blob/dev/src/Serilog.Settings.AppSettings/Serilog.Settings.AppSettings.csproj ? We've made that change in several other libs so should be no problem pushing through here. Any chance of a PR?

— Reply to this email directly, view it on GitHub https://github.com/serilog/serilog-settings-appsettings/issues/49#issuecomment-1079432863, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACDSMXO5WJVFFEQR3ZTA4DVBYS5LANCNFSM5RR4VPXQ . You are receiving this because you were mentioned.Message ID: @.***>

zachrybaker avatar Mar 26 '22 02:03 zachrybaker

Question: What version of System.Configuration.ConfigurationManager should a Serilog 4 version of this library use for none-framework builds? (e.g. use the minimum version that works / use the latest version / use versions that match the .NET 6/8 TFMs?)

Numpsy avatar Jun 19 '24 23:06 Numpsy

I think for this package I'd lean towards "the minimum non-vulnerable version that works", but I haven't given it any deep thought :-)

nblumhardt avatar Jun 20 '24 05:06 nblumhardt

Ok (version 5.0 has been deprecated now, so that won't be the one to use at least)

Numpsy avatar Jun 20 '24 08:06 Numpsy

WIP updates for Serilog 4 at https://github.com/serilog/serilog-settings-appsettings/pull/52 (adds .NET6/8 targets)

Numpsy avatar Jul 02 '24 19:07 Numpsy

V3 is published and now has these dependencies: image i.e it's using the inbox version of System.Configuration.ConfigurationManager on .NET Framework, and a 'minimum' version on .NET Standard and Core. I believe that users should be able to bump the reference to version 6 or newer in their own application if they need a newer version.

Numpsy avatar Jul 04 '24 15:07 Numpsy