@kevmal on the F# foundation slack shared an image of a typecheck error he had in a fsx script. He's on 2019 16.4, and after looking at the DotNetFrameworkDependencies.fs file I think I see what the problem is.

I believe the issue comes from here, where the string "FSharp.Compiler.Interactive.Settings" is passed as one of the dependencies to be resolved by getDependenciesOf. getDependenciesOf has some handling for 'simple names', that is assembly names that are not full file paths: it prepends the framework directory to the simple name and attempts to resolve that reference.
In this case I think this logic is incorrect, because the "FSharp.Compiler.Interactive.Settings" reference is colocated with the compiler, not with the rest of the framework references. I think that in this case, the assembly should be manually resolved by joining the simple name with the already-defined getFSharpCompilerLocation path, which should be correct.
Repro steps
- Create an fsx script in VS 2019 16.4
- use any member of the
fsi binding.
Expected behavior
The fsi binding's members are available in-editor.
Actual behavior
The fsi binding's members are not available.
Known workarounds
The user can always provide an explicit #r reference to the dll, but this is non-portable.
Related information
Provide any related information (optional):
- Operating system: Windows
- .NET Runtime kind: .NET Core 3.x
- Editing Tools: Visual Studio 2019 16.4
@kevmal on the F# foundation slack shared an image of a typecheck error he had in a fsx script. He's on 2019 16.4, and after looking at the
DotNetFrameworkDependencies.fsfile I think I see what the problem is.I believe the issue comes from here, where the string "FSharp.Compiler.Interactive.Settings" is passed as one of the dependencies to be resolved by
getDependenciesOf.getDependenciesOfhas some handling for 'simple names', that is assembly names that are not full file paths: it prepends the framework directory to the simple name and attempts to resolve that reference.In this case I think this logic is incorrect, because the "FSharp.Compiler.Interactive.Settings" reference is colocated with the compiler, not with the rest of the framework references. I think that in this case, the assembly should be manually resolved by joining the simple name with the already-defined
getFSharpCompilerLocationpath, which should be correct.Repro steps
fsibinding.Expected behavior
The fsi binding's members are available in-editor.
Actual behavior
The fsi binding's members are not available.
Known workarounds
The user can always provide an explicit #r reference to the dll, but this is non-portable.
Related information
Provide any related information (optional):