# CSVProvider in fsharpi on linux

**URL:** <https://forums.fsharp.org/t/csvprovider-in-fsharpi-on-linux/461>\
**Category:** General\
**Tags:** beginners\
**Created:** [September 7, 2018, 5:08pm UTC](https://forums.fsharp.org/t/csvprovider-in-fsharpi-on-linux/461 "2018-09-07T17:08:18Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![rbauduin](https://yyz2.discourse-cdn.com/flex030/user_avatar/forums.fsharp.org/rbauduin/32/314_2.png) [@rbauduin](https://forums.fsharp.org/u/rbauduin)\
**Post date:** [September 7, 2018, 5:08pm UTC](https://forums.fsharp.org/t/csvprovider-in-fsharpi-on-linux/461/1 "2018-09-07T17:08:18Z")

</div>

I’m typing this in fsharpi on linux (ubuntu 18.04, latest packages available installed as explained on [fsharp.org](http://fsharp.org)):

```auto
open FSharp.Data
let csvstring = @"Column1;Column2;Column3
mystring;123;20150331"
type CsvRecords = CsvProvider< csvstring, Separators=";", HasHeaders=true >
;;

```

but I get this error:

```auto
 error FS0039: The type 'CsvProvider' is not defined. Maybe you want one of the following:
   CsvRecords

```

The only completion proposed is for `FSharp.Data.UnitSystems`.

What am I doing wrong?

Thanks

---

<div class="post-metadata">

**Author:** ![HoraceGonzalez](https://yyz2.discourse-cdn.com/flex030/user_avatar/forums.fsharp.org/horacegonzalez/32/352_2.png) [@HoraceGonzalez](https://forums.fsharp.org/u/HoraceGonzalez)\
**Post date:** [September 7, 2018, 5:23pm UTC](https://forums.fsharp.org/t/csvprovider-in-fsharpi-on-linux/461/2 "2018-09-07T17:23:59Z")

</div>

Did you reference the `FSharp.Data.dll` using `#r`? Otherwise, fsharpi won’t know that `CsvProvider` exists. For example:

```auto
// loads the FSharp.Data.dll from nuget cache
#r ~/.nuget/packages/fsharp.data/2.4.6/lib/net45/FSharp.Data.dll;;

```

---

<div class="post-metadata">

**Author:** ![rbauduin](https://yyz2.discourse-cdn.com/flex030/user_avatar/forums.fsharp.org/rbauduin/32/314_2.png) [@rbauduin](https://forums.fsharp.org/u/rbauduin)\
**Post date:** [September 7, 2018, 6:50pm UTC](https://forums.fsharp.org/t/csvprovider-in-fsharpi-on-linux/461/3 "2018-09-07T18:50:08Z")

</div>

Thanks for your help. However I don’t find that dll:

```auto
:~$ dpkg -l | grep fsharp
ii fsharp 4.1.33-0xamarin7+ubuntu1804b1 all functional-first programming language - compiler for the CLI
ii libfsharp-core4.3-cil 4.1.33-0xamarin7+ubuntu1804b1 all functional-first programming language - core runtime library

:~$ dpkg -L fsharp | grep "\.dll"
/usr/lib/mono/fsharp/FSharp.Build.dll
/usr/lib/mono/fsharp/FSharp.Compiler.Interactive.Settings.dll
/usr/lib/mono/fsharp/FSharp.Compiler.Private.dll
/usr/lib/mono/fsharp/FSharp.Compiler.Server.Shared.dll
/usr/lib/mono/fsharp/System.Collections.Immutable.dll
/usr/lib/mono/fsharp/System.Reflection.Metadata.dll

:~$ dpkg -L libfsharp-core4.3-cil | grep "\.dll"
/usr/lib/mono/fsharp/FSharp.Core.dll
/usr/lib/mono/fsharp/api/.NETCore/3.259.41.0/FSharp.Core.dll
/usr/lib/mono/fsharp/api/.NETCore/3.7.41.0/FSharp.Core.dll
/usr/lib/mono/fsharp/api/.NETCore/3.78.41.0/FSharp.Core.dll
/usr/lib/mono/fsharp/api/.NETFramework/v4.0/4.3.0.0/FSharp.Core.dll
/usr/lib/mono/fsharp/api/.NETFramework/v4.0/4.3.1.0/FSharp.Core.dll
/usr/lib/mono/fsharp/api/.NETFramework/v4.0/4.4.0.0/FSharp.Core.dll
/usr/lib/mono/fsharp/api/.NETFramework/v4.0/4.4.1.0/FSharp.Core.dll
/usr/lib/mono/fsharp/api/.NETPortable/3.47.41.0/FSharp.Core.dll

```

I followed the [install instructions here](https://fsharp.org/use/linux/). Is it supposed to be available out of the box? Do I need to get it with nuget first? How?

---

<div class="post-metadata">

**Author:** ![HoraceGonzalez](https://yyz2.discourse-cdn.com/flex030/user_avatar/forums.fsharp.org/horacegonzalez/32/352_2.png) [@HoraceGonzalez](https://forums.fsharp.org/u/HoraceGonzalez)\
**Post date:** [September 8, 2018, 2:01am UTC](https://forums.fsharp.org/t/csvprovider-in-fsharpi-on-linux/461/4 "2018-09-08T02:01:36Z")

</div>

Right. The `FSharp.Data` library isn’t actually a core library. It separate package that needs to be downloaded (via paket or the nuget client). Here’s the nuget repo url: [https://www.nuget.org/packages/FSharp.Data/3.0.0-beta4](https://www.nuget.org/packages/FSharp.Data/3.0.0-beta4).

You can run the following command to get the library:

```auto
dotnet add package FSharp.Data --version 3.0.0-beta4 

```

The `FSharp.Data.dll` should then be available here `~/.nuget/packages/fsharp.data/3.0.0-beta4/lib/net45/FSharp.Data.dll`. This `~/.nuget` folder is where the dotnet cli caches all of these nuget packages.

---

<div class="post-metadata">

**Author:** ![rbauduin](https://yyz2.discourse-cdn.com/flex030/user_avatar/forums.fsharp.org/rbauduin/32/314_2.png) [@rbauduin](https://forums.fsharp.org/u/rbauduin)\
**Post date:** [September 8, 2018, 7:50am UTC](https://forums.fsharp.org/t/csvprovider-in-fsharpi-on-linux/461/5 "2018-09-08T07:50:41Z")

</div>

Thanks for the clarification. Is there a way to install it without creating a project? It says

```auto
Could not find any project in `/home/user/`.
Usage: dotnet add <PROJECT> package [options] <PACKAGE_NAME>

```

I’d like to first test it in the REPL, without creating a project. Is that possible?

---

<div class="post-metadata">

**Author:** ![albertwoo](https://yyz2.discourse-cdn.com/flex030/user_avatar/forums.fsharp.org/albertwoo/32/178_2.png) [@albertwoo](https://forums.fsharp.org/u/albertwoo)\
**Post date:** [September 8, 2018, 2:31pm UTC](https://forums.fsharp.org/t/csvprovider-in-fsharpi-on-linux/461/6 "2018-09-08T14:31:10Z")

</div>

You can just go to [nuget.org](http://nuget.org) to download the package and place some where then you can by using #r “the package dll you downloaded”. But by this you have to download other packages manually if it needs. You can also use paket manage this automatically for you without to create a project. [https://fsprojects.github.io/Paket/getting-started.html](https://fsprojects.github.io/Paket/getting-started.html). Or use fake ([http://fake.build/fake-gettingstarted.html](http://fake.build/fake-gettingstarted.html)) to do this for you.

---

<div class="post-metadata">

**Author:** ![rbauduin](https://yyz2.discourse-cdn.com/flex030/user_avatar/forums.fsharp.org/rbauduin/32/314_2.png) [@rbauduin](https://forums.fsharp.org/u/rbauduin)\
**Post date:** [September 8, 2018, 3:00pm UTC](https://forums.fsharp.org/t/csvprovider-in-fsharpi-on-linux/461/7 "2018-09-08T15:00:22Z")

</div>

Thanks! I’ll experiment with those.
