fsprojects / FSharp.Configuration

The FSharp.Configuration project contains type providers for the configuration of .NET projects.
http://fsprojects.github.io/FSharp.Configuration/
Other
114 stars 63 forks source link

[YamlConfig]: float value sometimes written like an int, then can't be read #149

Open bretthall opened 5 years ago

bretthall commented 5 years ago

If I have a yaml file that I use to create a type using FSharp.Configuration.YamlConfig and that file contains a floating point value like floatValue: 1.0 then the associated member of the F# type will be a float. If I then use the Save method of one of these objects with the floatValue set to 1.0 it should be written as 1.0 so that it can be read properly. On some machines this value will be written as 1 instead, and the resulting file cannot be read (there will be an error about having an Int32 for that property instead of a Double).