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
{{ message }}
Repository navigation
Drop support for netstandard2.0 for Npgsql 9.0 #5296
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.
Reacted by Günther Foidl, Nino Floris, hrrrrustic, Emmanuel André, Paulus Pärssinen, Elvis Nieves, Jadyn, Anton, cyril265, Romfos and 3 more
Reacted by hopla, Michael Kriese, Reinaldo Picone and mssucksalot
Reacted by hrrrrustic, Paulus Pärssinen and Romfos
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?
@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.
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.
@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 😅 )
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.
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.
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.
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.
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.
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?
@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.
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.
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.
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.
Activity
manandre commentedon Oct 18, 2023
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.0like someNpgsql.*plugins, do they move tonetstandard2.1?roji commentedon Oct 18, 2023
@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.
manandre commentedon Oct 18, 2023
@roji Does this table correctly sum up the targeted setup?
Brar commentedon Oct 19, 2023
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.
roji commentedon Oct 19, 2023
@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 😅 )
Brar commentedon Oct 19, 2023
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.
roji commentedon Oct 19, 2023
Yeah, we'll certainly have some unsupported TFMs in CI for previously-released versions for patching, but that seems pretty harmless no?
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.
manandre commentedon Oct 19, 2023
Let's start with this setup, we may adapt later if needed.
roji commentedon Oct 19, 2023
@manandre assuming we keep net6.0 for Npgsql, Npgsql.DependencyInjection should also keep working on net6.0.
manandre commentedon Oct 19, 2023
Oh you are right! New attempt:
3 remaining items
jemiller0 commentedon Dec 11, 2024
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.
roji commentedon Dec 11, 2024
@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.
mssucksalot commentedon Jul 26, 2025
And now Mono and T4 does not work. While I do not have issues with MySQL, I have issues with PostgreSQL.
jemiller0 commentedon Jul 26, 2025
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.
roji commentedon Jul 26, 2025
@jemiller0 that's definitely odd... But you'd need to raise that with nuget themselves.
harudini commentedon Mar 17, 2026
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?
roji commentedon Mar 17, 2026
@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.
jemiller0 commentedon Mar 17, 2026
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.
roji commentedon Mar 17, 2026
@jemiller0 how do you think we should support these, beyond provide security/critical patches for Npgsql 8.0 as I wrote above?
jemiller0 commentedon Mar 17, 2026
A concern would be that newer versions of PostgreSQL server wouldn't be supported.
jemiller0 commentedon Mar 17, 2026
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.
roji commentedon Mar 17, 2026
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...
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.
jemiller0 commentedon Mar 17, 2026
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.