FSharp.Data XmlProvider - No 'Schema' Parameter?

Hello, new to F# (and VS Code) so I assume I’m doing something wrong.

Examples here show use of an XML Schema to provide the data provider sample:


However when I try to use the Schema parameter as done here:

#load “H:/FSharp_Projects/packages/FsLab/FsLab.fsx”

open FsLab

open FSharp.Data

type Mdsolodm = XmlProvider<Schema = “H:/FSharp_Projects/XmlTests/ODMSchema2015.3.0/ODM1.3.1/mdsol.xsd”>

I get this error:

XmlProvider_noSchema.fsx(9,29): error FS3082: No static parameter exists with name ‘Schema’

but I am able to use a sample XML file successfully. Should the Schema parameter be available to me, or is the documentation out of date?

Many thanks!

The support for Schema’s was only added in FSharp.Data 3.0.0 Beta 4

I’ve just tried to nuget install that version locally to test but I’m getting an error with Nuget Install on Full Framework:

~\Source\FS> .\NuGet.exe install FSharp.Data -Version 3.0.0-beta4
Attempting to resolve dependency ‘FSharp.Core (=’.
Attempting to resolve dependency ‘FSharp.Core (= 4.3.4)’.
Unable to resolve dependency ‘FSharp.Core (= 4.3.4)’.

It seems to work OK on .NET Core though.

Thank you Dave! I didn’t consider that I might need a newer version, since my setup is so new. I’ll have to see what I can do to get that Beta to work.

Best Regards!

1 Like