mbraceproject / FsPickler

A fast multi-format message serializer for .NET
http://mbraceproject.github.io/FsPickler/
MIT License
324 stars 52 forks source link

Pickling to Code Quotations for Deserialization in a Different Runtime #59

Closed cloudRoutine closed 7 years ago

cloudRoutine commented 8 years ago

I'm trying to use FsPickler to send code quotations over a named pipe from a server running inside of FSI to a client running inside of the Unity3d engine. The client has a quotation evaluator that it uses to execute code against the engine's internal API. The issue comes from the reflection based loading of the FSharp.Core and mscorlib at different version numbers

Here's an example of the different JSON produced

There are also some differences in the instance and id numbers, and the FSI version having a third Item = null in a few places, but I'm not sure how relevant those are to block being deserialized effectively.

Is there a way to specify the target runtime and target version of FSharp.Core for serialization? and if not could this be incorporated as a future feature?

eiriktsarpalis commented 8 years ago

This is a common issue typically solved with binding redirects. Does the Unity engine provide something similar?

dsyme commented 7 years ago

Closing this old question/discussion