Problem with type provider using dotnet fsi
- Dominant language
- F#
- Stars
- 4.3k
- Forks
- 876
- Avg merge
- 4d 11h
- Merged PRs (30d)
- 131
Description
Please provide a succinct description of the issue.
**Repro steps**
Provide the steps required to reproduce the problem:
1. Run the [following sample](https://gist.github.com/wallymathieu/dc73bf8b387ed4ca9384fda1ad939c78#file-typelevel-fsx) of F#+ typelevel project in fsi
2. Compare the compilation output with the result from running a similar [program with an fsproj and Program.fs](https://gist.github.com/wallymathieu/dc73bf8b387ed4ca9384fda1ad939c78#file-program-fs)
[typeprovider issue.zip](https://github.com/dotnet/fsharp/files/7779812/typeprovider.issue.zip)
**Expected behavior**
The expectation is that the script should compile, since the program does.
**Actual behavior**
The script compilation fails with:
```
let x = TypeNat<2>.Value;;
--------^^^^^^^^^^
/Users/mathieu/src/fs/typelevel/stdin(3,9): error FS1109: A reference to the type 'FSharpPlus.TypeLevel.TypeNat,value="2"' in assembly 'FSharpPlus.Providers' was found, but the type could not be found in that assembly
```
**Known workarounds**
Compile in a project instead of in a script
**Related information**
Provide any related information (optional):
* Operating system: Windows 10, macOS 12
* .NET Runtime kind (.NET Core, .NET Framework, Mono) .net core 6
* Editing Tools (e.g. Visual Studio Version, Visual Studio)
Contributor guide
Assessment
This issue has not been assessed yet.