2

I am new to F#. I'm trying to use the CSV Type Provider in an F# Script File.

I created a new project in Visual Studio 2015 and added the FSharp.Data nuget package.

I created a script file with the following contents:

#r "../packages/FSharp.Data.2.3.2/lib/portable-net45+netcore45/FSharp.Data.dll"
open FSharp.Data
type Logs = CsvProvider<"logs.csv">

However, I get red squiggly lines under the open FSharp.Data line. The intelisense says "The type referenced through System.Globalization.CultureInfo is defined in an assembly that is not referenced.

Also there is a red squiggly line under CsvProvider that says "The type 'CsvProvider' is not defined".

I am using this tutorial as a reference but I don't understand why it is not working: http://fsharp.github.io/FSharp.Data/library/CsvProvider.html

asked Oct 4, 2016 at 17:31

1 Answer 1

6

Ok, thanks to some help from a friend I found the issue. I added the following line and it fixed the issue.

#r "System.Globalization"
answered Oct 4, 2016 at 17:48

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.