Switch binary-serialization to an implementation that is supported by CoreClr
Activity
Frédéric Delaporte May 31, 2018 at 5:52 PM
Frédéric Delaporte July 16, 2017 at 8:40 PM
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.
Nathan Brown July 16, 2017 at 8:15 PMEdited
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 are System.Type
, System.Reflection.MethodInfo
, and System.Reflection.FieldInfo
.
For more information, refer to https://github.com/dotnet/corefx/issues/19119, specifically search for UnitySerializationHolder
, as that is what serializes System.Type in the .NET Framework.
Nathan Brown August 14, 2016 at 7:58 PM
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?
JSON.NET or XmlSerializer