Skip to content

Drop support for netstandard2.0 for Npgsql 9.0 #5296

Closed

Description

@roji

After some internal discussion, we believe the time has come: we'll be dropping support for netstandard2.0 for Npgsql 9.0; this notably means that it will not be possible to use Npgsql 9.0 from .NET Framework. People still on .NET Framework will need to stay on older versions of Npgsql, such as 8.0.

Activity

  1. added this to the 9.0.0 milestone on Sep 27, 2023
  2. manandre commented on Oct 18, 2023

    @manandre
    Collaborator

    I fully support this decision, it was already great to keep compatibility with .NET Framework for such a long time!

    The impact on supported TFMs for Npgsql 9.0 is not clear for me, in particular for packages currently supporting netstandard2.0 like some Npgsql.* plugins, do they move to netstandard2.1?

  3. roji commented on Oct 18, 2023

    @roji
    MemberAuthor

    @manandre netstandard2.1 supports only .NET Core 3.0 and above (and no .NET Framework at all, see table); given that the oldest .NET Core TFM that's supported is net6.0, netstandard2.1 is kinda dead.

    So the plan would be for Npgsql 9.0 to target net6.0 as its minimum TFM. The Npgsql plugins which are maintained in our repo would also be updated to target net6.0 as the minimum, others would need to update as well.

  4. manandre commented on Oct 18, 2023

    @manandre
    Collaborator

    @roji Does this table correctly sum up the targeted setup?

    Package netstandard2.0 netstandard2.1 net5.0 net6.0 net7.0 net8.0 net9.0
    Npgsql Remove Remove Remove Keep Keep Keep New
    Npgsql.DependencyInjection Remove Keep
    Npgsql.GeoJSON Remove New
    Npgsql.Json.Net Remove Keep
    Npgsql.NetTopologySuite Remove New
    Npgsql.NodaTime Remove Keep
    Npgsql.OpenTelemetry Remove New
  5. Brar commented on Oct 19, 2023

    @Brar
    Member

    Given that Npgsql 9 will probably appear after November 12, 2024, maybe we should align with the official .NET support policy and already drop net6.0.
    I know that net6.0 currently causes very little maintenance burden, but that will occur at some point and I see a big pro in having a predictable support policy.

  6. roji commented on Oct 19, 2023

    @roji
    MemberAuthor

    @manandre given that net7.0 goes out of support in May of 2024 and Npgsql 9.0 will be released in October, I don't think we'll be targeting net7.0. But otherwise that looks more or less right.

    @Brar yeah, technically we could drop net6.0 as well for 9.0. As net6.0 will go out of support exactly when we release Npgsql 9, I think it would be helpful to support it for one more year, giving users a bit more time to upgrade; but I don't have super strong feelings about it...

    (It's already such a relief to get rid of netstandard2.0 and the old stuff that keeping net6.0 for a year seems like no effort at all 😅 )

  7. Brar commented on Oct 19, 2023

    @Brar
    Member

    What I have in mind that we typically not only support the current Npgsql release, but rather also the two previous ones.
    So dropping it with Npgsql 10 in 2025 would make us install the long unsupported net6.0 for maintenance purposes until 2027 in order to be able to backpatch and test things for Npgsql 9.
    Also I don't see the point in upgrading Npgsql to the newest release (given we still maintain the older ones too) while staying on an out of support version of .NET.

  8. roji commented on Oct 19, 2023

    @roji
    MemberAuthor

    Yeah, we'll certainly have some unsupported TFMs in CI for previously-released versions for patching, but that seems pretty harmless no?

    Also I don't see the point in upgrading Npgsql to the newest release (given we still maintain the older ones too) while staying on an out of support version of .NET.

    Maybe, but we know lots of people do that... They may urgently need a feature or bug fix from the new Npgsql version, but don't have the time right away to upgrade and test the new .NET version, for example.

    I'm not really pushing back that much - we can see what the other Npgsql folks think. It's just that keeping net6.0 for another year will likely add no burden on us, is all.

  9. manandre commented on Oct 19, 2023

    @manandre
    Collaborator

    Let's start with this setup, we may adapt later if needed.

    Package netstandard2.0 netstandard2.1 net5.0 net6.0 net7.0 net8.0 net9.0
    Npgsql Remove Remove Remove Keep Remove Keep New
    Npgsql.DependencyInjection Remove Remove New
    Npgsql.GeoJSON Remove New
    Npgsql.Json.Net Remove Keep
    Npgsql.NetTopologySuite Remove New
    Npgsql.NodaTime Remove Keep
    Npgsql.OpenTelemetry Remove New
  10. roji commented on Oct 19, 2023

    @roji
    MemberAuthor

    @manandre assuming we keep net6.0 for Npgsql, Npgsql.DependencyInjection should also keep working on net6.0.

  11. manandre commented on Oct 19, 2023

    @manandre
    Collaborator

    Oh you are right! New attempt:

    Package netstandard2.0 netstandard2.1 net5.0 net6.0 net7.0 net8.0 net9.0
    Npgsql Remove Remove Remove Keep Remove Keep New
    Npgsql.DependencyInjection Remove New Remove
    Npgsql.GeoJSON Remove New
    Npgsql.Json.Net Remove Keep
    Npgsql.NetTopologySuite Remove New
    Npgsql.NodaTime Remove Keep
    Npgsql.OpenTelemetry Remove New
  12. self-assigned this
    on Nov 21, 2023
  13. 3 remaining items

  14. jemiller0 commented on Dec 11, 2024

    @jemiller0

    OK, thanks. I suspect that there are a lot of ASP.NET Web Forms apps out there that won't be upgraded anytime soon that will need it. Too bad Microsoft threw Web Forms under the bus and didn't move it forward onto .NET.

  15. roji commented on Dec 11, 2024

    @roji
    MemberAuthor

    @jemiller0 yep, for sure - these will have to stay on an old version of Npgsql (8.0), and will no longer benefit from new features/improvements etc.

  16. marked Why 9.0 nix netstandard #6129 as a duplicate of this issue on Jun 4, 2025
  17. added theissue type on Jun 18, 2025
  18. mssucksalot commented on Jul 26, 2025

    @mssucksalot

    After some internal discussion, we believe the time has come: we'll be dropping support for netstandard2.0 for Npgsql 9.0; this notably means that it will not be possible to use Npgsql 9.0 from .NET Framework. People still on .NET Framework will need to stay on older versions of Npgsql, such as 8.0.

    And now Mono and T4 does not work. While I do not have issues with MySQL, I have issues with PostgreSQL.

  19. jemiller0 commented on Jul 26, 2025

    @jemiller0

    It would be great if something could be done about Nuget so that it doesn't constantly offer the 9.x version for .NET Framework projects. Whenever I upgrade the rest of my packages, I always have to make sure I uncheck the one for Npgsql and leave it at 8.

  20. roji commented on Jul 26, 2025

    @roji
    MemberAuthor

    @jemiller0 that's definitely odd... But you'd need to raise that with nuget themselves.

  21. harudini commented on Mar 17, 2026

    @harudini

    I’m currently building Npgsql 8.0 locally and noticed that it targets .NET SDK 8.
    From what I understand, the .NET SDK 8.0 is used to build the distributed Npgsql 8.0 package.
    However, since .NET 8 is set to reach its EOL at the end of this year, and Npgsql 8.0 will be maintained to support .NET Framework, I'm wondering what the policy will be regarding the .NET SDK used for Npgsql 8.0 builds.
    Will .NET SDK 8 continue to be used to build Npgsql 8.0 moving forward?

  22. roji commented on Mar 17, 2026

    @roji
    MemberAuthor

    @harudini we haven't given it much specific thought; we could use .NET SDK 10 to build Npgsql 8, but it in any case needs to target net8.0, which itself will be EOL; so I'm not sure it's that valuable to use a supported SDK to targeted an unsupported TFM. Any specific concern in your mind?

    Note that in any case, Npgsql 8.0 will also mostly stop receiving patches at the end of this year; we mostly intend to keep it "supported" in the sense that we'd fix security issues (or possibly other critical bugs), but nothing beyond that.

  23. jemiller0 commented on Mar 17, 2026

    @jemiller0

    I hope you take into consideration that there are many apps out there that will not upgrade from .NET Framework 4.8. Specifically, apps that use things like Web Forms which are not supported on .NET.

  24. roji commented on Mar 17, 2026

    @roji
    MemberAuthor

    @jemiller0 how do you think we should support these, beyond provide security/critical patches for Npgsql 8.0 as I wrote above?

  25. jemiller0 commented on Mar 17, 2026

    @jemiller0

    A concern would be that newer versions of PostgreSQL server wouldn't be supported.

  26. jemiller0 commented on Mar 17, 2026

    @jemiller0

    As far as I knew, the policy regarding 8.0 was already what you described above as taking effect at the end of the year.

  27. roji commented on Mar 17, 2026

    @roji
    MemberAuthor

    A concern would be that newer versions of PostgreSQL server wouldn't be supported.

    PostgreSQL has always been 100% backwards compatible, so old versions of Npgsql should work just fine on newer versions of PostgreSQL. If they really do make a protocol change that makes it impossible to use Npgsql 8.0, I suspect we'd treat that as a "critical" issue and patch it - but I wouldn't see that as a reason to continue maintaining .NET Framework support forever in all new versions, which creates quite a maintainability drag...

    As far as I knew, the policy regarding 8.0 was already what you described above as taking effect at the end of the year.

    Yep, pretty much - I was just responding to the very specific question by @harudini about which SDK would we use to build Npgsql 8.0.

  28. jemiller0 commented on Mar 17, 2026

    @jemiller0

    OK, thanks for the info. I don't really care about new functionality, as long as it doesn't become the case that the driver no longer works with the current version of PostgreSQL server.

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

Metadata

Metadata

Assignees

Type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions