NHibernate Mapping Error: "method MemberwiseClone should be public/protected virtual"

typescript
Ethan JacksonToday I attempted to upgrade my application from .NET 8.0 to .NET 9.0.
Now NHibernate throws an exception when I invoke NHibernateCfg.Configuration.BuildSessionFactory
.
The following types may not be used as proxies:
<my class 1>: method MemberwiseClone should be 'public/protected virtual' or 'protected internal virtual'
<my class 2>: method MemberwiseClone should be 'public/protected virtual' or 'protected internal virtual'
How could I got about solving this?
Answer
The solution was to upgrade my version of NHibernate.
I upgraded from version 5.2.7 to 5.5.2 and now the problem is fixed.