Skip to content

CSV TP behaviour has changed for local files? #1218

@isaacabraham

Description

@isaacabraham

I opened an old project of mine today which uses the CSV provider, having upgraded to the latest version of FSharp.Data (2.4.6).

I have a local CSV file.

type Football = CsvProvider< @"\..\Data\FootballResults.csv">

When I create the CSV Provider, it "works" inside the code editor (with intellisense etc.), but when I execute in FSI, it shows no rows are read (with a empty seq).

If I change the code to as follows, it then starts working:

[<Literal>]
let Path = __SOURCE_DIRECTORY__ + @"\..\Data\FootballResults.csv"
type Football = CsvProvider<Path>

Is this a change in behaviour from the TP? Or something about upgrading to VS2017? Or just something I'm doing wrong? I've tried the usual trick of Environment.CurrentDirectory <- __SOURCE_DIRECTORY__ but that didn't help either.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions