NHibernate ..Net 7 support

30 views
Skip to first unread message

Ludovic BONNET

unread,
Jun 22, 2023, 4:26:57 PM6/22/23
to nhusers
Hello,

I'm using NHibernate with .Net 5 to work with a MariaDb database and I have no problem.

I have to migrate my code to .Net 7 (and maybe soon .Net 8) and I'm surprised because i'm not seeing support for .Net 7 in the latest nuget 5.4.2 release (https://www.nuget.org/packages/NHibernate).

.Net 7 has been released since novembre 22 so why NHibernate has no support for it?
Did I have to change my ORM for future migration?

Frédéric Delaporte

unread,
Jun 22, 2023, 4:56:06 PM6/22/23
to nhusers
We do not need to publish a new version for .Net7 or 8 to have NHibernate work with them. NHibernate is compatible with them since long (version 5.1, released in 2018).

Have you check the Nuget Framework tab? Why do you think it is not supported? A library does not need to target explicitly each new release of the framework to be compatible with it.
It only needs to do so when the library developers want to use new features of the newer framework release.

If that is the library consumer who wants to use new features of the newer framework release, depending on a library targeting an older does not prevent it in most cases.
NHibernate having some advanced interaction logic with the user code, such as building proxies of user classes, sometimes we may need to adapt to new features of newer frameworks to allow them to be used by the user, like here, for supporting a .Net 7 feature. But we did not even had to target that framework to support this new feature.
Reply all
Reply to author
Forward
0 new messages