Nessos.FsPickler.FsPicklerException: Error deserializing object of type 'ns.A+B+ReactorModel'. ---> System.InvalidCastException: Cannot cast from source type to destination type.
at (wrapper castclass) object.__castclass_with_cache (object,intptr,intptr) <IL 0x0002c, 0x0005b>
at Nessos.FsPickler.CompositePickler`1<Nessos.FsPickler.AssemblyInfo>.Read (Nessos.FsPickler.ReadState,string) <0x002b3>
at Nessos.FsPickler.ReflectionPicklers/[email protected] (Nessos.FsPickler.ReadState,string) <IL 0x00076, 0x000c0>
at Microsoft.FSharp.Core.FSharpFunc`2<Nessos.FsPickler.ReadState, string>.InvokeFast<System.Reflection.MemberInfo> (Microsoft.FSharp.Core.FSharpFunc`2<Nessos.FsPickler.ReadState, Microsoft.FSharp.Core.FSharpFunc`2<string, System.Reflection.MemberInfo>>,Nessos.FsPickler.ReadState,string) <0x0004e>
at <StartupCode$FsPickler>.$CompositePickler/reader@112<System.Type, System.Reflection.MemberInfo>.Invoke (Nessos.FsPickler.ReadState,string) <0x00037>
at Microsoft.FSharp.Core.FSharpFunc`2<Nessos.FsPickler.ReadState, string>.InvokeFast<System.Type> (Microsoft.FSharp.Core.FSharpFunc`2<Nessos.FsPickler.ReadState, Microsoft.FSharp.Core.FSharpFunc`2<string, System.Type>>,Nessos.FsPickler.ReadState,string) <0x0004e>
at Nessos.FsPickler.CompositePickler`1<System.Type>.Read (Nessos.FsPickler.ReadState,string) <0x00337>
at <StartupCode$FsPickler>.$ISerializablePickler/reader@118-36<System.Uri>.Invoke (Nessos.FsPickler.ReadState,string) <0x002d3>
at Microsoft.FSharp.Core.FSharpFunc`2<Nessos.FsPickler.ReadState, string>.InvokeFast<System.Uri> (Microsoft.FSharp.Core.FSharpFunc`2<Nessos.FsPickler.ReadState, Microsoft.FSharp.Core.FSharpFunc`2<string, System.Uri>>,Nessos.FsPickler.ReadState,string) <0x0004e>
// etc
Unfortunately I don't have a better repro right now as it's pretty deep inside my own code.