Skip to content

type resolution in script file doesn't work for type provider without qualified names #13887

@smoothdeveloper

Description

@smoothdeveloper

Repro steps
Setting "Use .NET Core Scripting" to False:

image

I'm facing situation with a script such as:

#r "nuget: FSharp.Data"
open FSharp.Data
type J = JsonProvider< """{ "a":"b", "c": 1}""">
type JQualified = FSharp.Data.JsonProvider< """{ "a":"b", "c": 1}""">

the first JsonProvider shows squiggles

FS00039: The type JsonProvider is not defined.

It doesn't happen with "Use .NET Core Scripting" to True.

It doesn't affect fsianycpu.exe evaluation but just the tooling.

Actual behavior

the first JsonProvider shows squiggles

FS00039: The type JsonProvider is not defined.

image

Expected behavior

It should work disregarding the setting.

Known workarounds

Using qualified names, which is a bit problematic.

Related information

  • Windows 11 Pro 22H2 22622.590
  • VS 2022 17.2.6

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Done

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions