Binary serialization (`BinaryFormatter`) is made obsolete in .Net 5. Some caches use it by default. They have to be made obsolete themselves for .Net 5, or changed for another serialization default when possible. (Issue extracted from nhibernate/nhibernate-core#2603.)