Steve
Steve

Reputation: 1636

F# Fsharp.Data Type Provider Exception

I am getting this when trying to parse a simple csv string. I am running F# out of VS 2013, the dll says it is version 4.3.0.1 which I thought was F# 3.1. My Fsharp.Data dll is 1.1.10.

I am trying to run this as part of an nunit test using resharper. The snippet does work in interactive mode.

Here is the code:

open FSharp.Data

type TestCsv = CsvProvider<"test,taht\n1,1">
let x = TestCsv.Parse "test,taht\n1,1"
let tests = x.Data |> Seq.map (fun x -> x.test) 
tests |> Seq.head

And the result:

System.Exception : Couldn't parse row 1 according to schema: Method not found: 'Microsoft.FSharp.Core.FSharpOption`1<System.String> FSharp.Data.RuntimeImplementation.Operations.AsOption(System.String)'.

Any ideas how to fix this?

Upvotes: 2

Views: 636

Answers (1)

Gustavo Guerra
Gustavo Guerra

Reputation: 5359

FSharp.Data 1.1.10 doesn't support F# 3.1/VS2013. Please try with the prerelease version 2.0.0-alpha3 and let us if that works. Make sure both the unit test project and the library project are using the same version of FSharp.Core (either 4.3.0.0 or 4.3.1.0)

Upvotes: 1

Related Questions