Skip to content

NH-3853 - Switch binary-serialization to an implementation that is supported by CoreClr  #889

Closed
@nhibernate-bot

Description

@nhibernate-bot

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 are System.Type, System.Reflection.MethodInfo, and System.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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions