Description
Johannes Rauber created an issue — 29th February 2016, 12:54:58:
JSON.NET or XmlSerializer
Nathan Brown added a comment — 14th August 2016, 19:58:29:
Can serialization be made an optional feature instead of switching it out? Obviously
SerializableType
would be disabled. What besides second-level caches would be otherwise affected?
Nathan Brown added a comment — 16th July 2017, 20:15:19:
With .NET Core 2.0,
SerializableType
actually works, but most other binary serialization used throughout NHibernate do not work. Things like serializing the configuration or a session do not work because those types include fields that areSystem.Type
,System.Reflection.MethodInfo
, andSystem.Reflection.FieldInfo
.For more information, refer to https://github.com/dotnet/corefx/issues/19119(https://github.com/dotnet/corefx/issues/19119), specifically search for
UnitySerializationHolder
, as that is what serializes System.Type in the .NET Framework.
Frédéric Delaporte added a comment — 16th July 2017, 20:40:06:
I do not believe second level cache uses binary serialization.
For me, serialization is mainly a session feature used in some patterns like long conversations, allowing to serialize the session, dispose of it, then later deserialize it and go on with the "unit of work". I do not know if this feature is much used. From my point of view (which maybe lacks some reasons about why we can serialize sessions, session factories, ...), we could choose to not support serialization when targeting .Net Core / Standard.