FSharp.Data icon indicating copy to clipboard operation
FSharp.Data copied to clipboard

Issue JsonProvider only works with full qualified name, not with open namespace.

Open Hardt-Coded opened this issue 5 years ago • 2 comments

The issue is, that:

#r "../fsharp.data.dll"
open FSharp.Data

type MyJson = JsonProvider<"...">

doesn't work any more. You have to use the full qualified name.

#r "../fsharp.data.dll"
open FSharp.Data

type MyJson = FSharp.Data.JsonProvider<"...">

If you use "Alt + Return" to send this code to the FSI, that it works.

I uses the netstandard2.0 dll.

Reproduced it in:

  • Visual Studio 2019 -16.4.5
  • VSCode

pics: image

and:

works in code: image

works not in code:

image

Hardt-Coded avatar Feb 26 '20 18:02 Hardt-Coded

What about compiling from the command line?

dsyme avatar Feb 26 '20 19:02 dsyme

If I use this in a .fs source file in a console application, that the issue doesn't appear. Also a compiling is possible. (dotnet build) It seems only a fsi issue. But Alt + Return works also, even with error the squiggles.

Hardt-Coded avatar Feb 26 '20 19:02 Hardt-Coded