Skip to content

Review supported frameworks #91

Closed
Closed

Description

@Jericho

I suggest we modernize the list of targeted frameworks in the upcoming 4.0 release. Currently, we support net45, netstandard 1.3 and netstandard2.0

Some factors that lead me to think that we should review which frameworks we support:

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.

Activity

  1. Pathoschild commented on Apr 22, 2020

    @Pathoschild
    Owner

    Hi! Newer platforms will use the netstandard2.0 target per those targeting guidelines:

    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.

  2. added this to the 4.0 milestone on Apr 22, 2020
  3. Jericho commented on Apr 22, 2020

    @Jericho
    ContributorAuthor

    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.

  4. Pathoschild commented on Apr 23, 2020

    @Pathoschild
    Owner

    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:

    <ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' OR '$(TargetFramework)' == 'net45' ">
      <PackageReference Include="Microsoft.AspNet.WebApi.Client" Version="5.2.7" />
    </ItemGroup>

    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.

  5. Pathoschild commented on May 6, 2020

    @Pathoschild
    Owner

    @Jericho Any objections to keeping the framework targets as-is per the above?

  6. Jericho commented on May 7, 2020

    @Jericho
    ContributorAuthor

    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.

  7. Pathoschild commented on May 8, 2020

    @Pathoschild
    Owner

    (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.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions