You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some of Microsoft's own nuget packages have stopped supporting net45x in favor of net461. Case in point: Package System.Text.Encoding.CodePages supports net461 but it does not support net452. This means that it will become more an more difficult to upgrade the packages we depend on.
All this to say that I would personally be inclined to support net461 instead of net45 and to drop support for netstandard1.x from FluentHttpClient.
All platforms supporting .NET Standard 2.0 will use the netstandard2.0 target and benefit from having a smaller package graph while older platforms will still work and fall back to using the netstandard1.x target.
The older targets are only for backwards compatibility and have their own dependencies, so they shouldn't affect our work on newer platforms. I think high backwards compatibility is useful when possible, so you can still use the client in legacy projects.
The targeting guideline document contains the following recommendation: AVOID including a netstandard1.x target. That's why I am suggesting removing the netstandard1.3 target.
It also contains the following recommendation: CONSIDER adding a target for net461 when you're offering a netstandard2.0 target. That's why I am suggesting adding a net461 target.
As far as the All platforms supporting .NET Standard 2.0 will use the netstandard2.0 target statement: it's actually not that simple! The rules to determine which target is used under some scenarios are confusing and the source of many errors. More details here. Near the end of the thread, you will find an unofficial recommendation. That's what I implemented in my own libraries about a year ago, with great success.
I understand your desire to maintain backward compatibility, even with platforms that are no longer maintained, but the developers who use such legacy platforms are probably willing to continue using FluentHttpClient 3.x and not be able to upgrade to 4.x
Anyway, long story short: my recommendation would be to target net461, net472 and netstandard2.0 in the upcoming 4.0 release.
Thanks for the links! Based on that discussion and this tool, it seems all versions of .NET Framework will use the net45 target. That avoids the issues with netstandard2.0 they suggest adding net461 for, and the targets are identical for our purposes:
netstandard1.3 is the odd one, since it needs multiple dependencies. The net45 target was partly added to avoid older .NET Framework platforms using netstandard1.3. Dropping netstandard1.3 would remove support for some newer legacy platforms though (like .NET Core 1.1 which was supported up to last year).
So it seems like targeting net45 is exactly equivalent to targeting net461/net472 in this case.
I tried to make a case for updating the frameworks using Microsoft's guideline to back up my case and I mentioned that developers who use legacy/unsupported frameworks can simply continue using 3.x while the rest of us who are using more recent frameworks can upgrade to 4.x.
You are already introducing breaking changes in 4.0 so in my opinion it would be a perfect opportunity to update the frameworks as well.
All this to say that keeping the current framework is not my preference, but I don't object per se.
(I do think we conform to those guidelines. Compatibility with older platforms is deliberate, and the disadvantages don't apply to .NET Framework which will use net45 or.NET Standard 2.0+ which will use netstandard2.0. The netstandard1.3 target doesn't affect modern platforms, isn't holding us back on anything we want to do, and dropping it only reduces the package size by 32KB.)
Activity
Pathoschild commentedon Apr 22, 2020
Hi! Newer platforms will use the
netstandard2.0target per those targeting guidelines:The older targets are only for backwards compatibility and have their own dependencies, so they shouldn't affect our work on newer platforms. I think high backwards compatibility is useful when possible, so you can still use the client in legacy projects.
Jericho commentedon Apr 22, 2020
The targeting guideline document contains the following recommendation:
AVOID including a netstandard1.x target. That's why I am suggesting removing thenetstandard1.3target.It also contains the following recommendation:
CONSIDER adding a target for net461 when you're offering a netstandard2.0 target. That's why I am suggesting adding a net461 target.As far as the
All platforms supporting .NET Standard 2.0 will use the netstandard2.0 targetstatement: it's actually not that simple! The rules to determine which target is used under some scenarios are confusing and the source of many errors. More details here. Near the end of the thread, you will find an unofficial recommendation. That's what I implemented in my own libraries about a year ago, with great success.I understand your desire to maintain backward compatibility, even with platforms that are no longer maintained, but the developers who use such legacy platforms are probably willing to continue using FluentHttpClient 3.x and not be able to upgrade to 4.x
Anyway, long story short: my recommendation would be to target net461, net472 and netstandard2.0 in the upcoming 4.0 release.
Pathoschild commentedon Apr 23, 2020
Thanks for the links! Based on that discussion and this tool, it seems all versions of .NET Framework will use the
net45target. That avoids the issues withnetstandard2.0they suggest addingnet461for, and the targets are identical for our purposes:netstandard1.3is the odd one, since it needs multiple dependencies. Thenet45target was partly added to avoid older .NET Framework platforms usingnetstandard1.3. Droppingnetstandard1.3would remove support for some newer legacy platforms though (like .NET Core 1.1 which was supported up to last year).So it seems like targeting
net45is exactly equivalent to targetingnet461/net472in this case.Pathoschild commentedon May 6, 2020
@Jericho Any objections to keeping the framework targets as-is per the above?
Jericho commentedon May 7, 2020
I tried to make a case for updating the frameworks using Microsoft's guideline to back up my case and I mentioned that developers who use legacy/unsupported frameworks can simply continue using 3.x while the rest of us who are using more recent frameworks can upgrade to 4.x.
You are already introducing breaking changes in 4.0 so in my opinion it would be a perfect opportunity to update the frameworks as well.
All this to say that keeping the current framework is not my preference, but I don't object per se.
Pathoschild commentedon May 8, 2020
(I do think we conform to those guidelines. Compatibility with older platforms is deliberate, and the disadvantages don't apply to .NET Framework which will use
net45or.NET Standard 2.0+ which will usenetstandard2.0. Thenetstandard1.3target doesn't affect modern platforms, isn't holding us back on anything we want to do, and dropping it only reduces the package size by 32KB.)