Simple F# TypeProvider code cannot run in LINQPad
Options
Say I have code like this and with nuget package
FSharp.Data
installed:
open FSharp.DataThis code run perfectly fine with Visual Studio, but when I run it in latest LINQPad(5.37.00), it will throws a MissingMethodException:
[<Literal>]
let path = @"https://www.linqpad.net"
type QueryHtml = HtmlProvider<path>
let html = QueryHtml.Load(path)
MissingMethodException:I switched both "Always use built-in F# compiler" On/Off, and switched both FSharp.Data version 3.0/2.x, both throw this exception. Is there any reason or any solution for this?
Failed to find method:“Microsoft.FSharp.Control.FSharpAsync`1<System.IO.TextReader> FSharp.Data.Runtime.IO.asyncReadTextAtRuntime(Boolean, System.String, System.String, System.String, System.String, System.String)”。
Comments
-
Is there any explaination or solution?
-
Hi, was getting the same error, and adding FSharp.Core 4.6 using linqpad nuget fixed it, if you check your visual studio project there is a very good chance that the project also has FSharp.Core
-
Thanks, install FSharp.Core nuget package fixed it.