Skip to content

Instantly share code, notes, and snippets.

@eiriktsarpalis
Created January 25, 2014 13:14
Show Gist options
  • Save eiriktsarpalis/8616199 to your computer and use it in GitHub Desktop.
Save eiriktsarpalis/8616199 to your computer and use it in GitHub Desktop.
FsPickler without strong names
open FsPickler
let settings = new CustomPicklerRegistry("noStrongNames")
let nostrongnames =
{
new ITypeNameConverter with
member __.ToDeserializedType tI = tI
member __.OfSerializedType (tI : TypeInfo) =
{
Name = tI.Name
AssemblyName = tI.AssemblyName
Version = null
Culture = null
PublicKeyToken = null
}
}
settings.SetTypeNameConverter nostrongnames
let fsp = new FsPickler(settings)
// serialize away
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment