FSharp.Data Csv.Load() failed with Only web locati

2019-07-21 11:26发布

问题:

I have the following code:

#r "../packages/FSharp.Data.2.0.9/lib/portable-net40+sl5+wp8+win8/FSharp.Data.dll"

open FSharp.Data

let trainData = CsvFile.Load("../resources/Train.csv")
let rowCount = trainData.Rows |> Seq.length

And I am getting this exception

System.Exception: Only web locations are supported

I am using VS2012. Has anyone seen this before?

回答1:

I changed it to

#r "../packages/FSharp.Data.2.0.9/lib/net40/FSharp.Data.dll"

and it worked

Hope this helps someone



标签: f# f#-data