System.MissingMethodException: method not found: 'FSharp.Data.HttpResponse

I wrote ATs for my application in F # using Tickspec. I use FSharp.Data.Http.Requestand I get the following error:

System.MissingMethodException : Method not found: 'FSharp.Data.HttpResponse     
FSharp.Data.Http.Request(System.String,  
Microsoft.FSharp.Core.FSharpOption`1<Microsoft.FSharp.Collections.FSharpList`1
<System.Tuple`2<System.String,System.String>>>,  
Microsoft.FSharp.Core.FSharpOption`1<System.Collections.Generic.IEnumerable`1
<System.Tuple`2<System.String,System.String>>>,   
Microsoft.FSharp.Core.FSharpOption`1<System.String>,   
Microsoft.FSharp.Core.FSharpOption`1<FSharp.Data.HttpRequestBody>,    
Microsoft.FSharp.Core.FSharpOption`1<System.Collections.Generic.IEnumerable`
1<System.Tuple`2<System.String,System.String>>>,
Microsoft.FSharp.Core.FSharpOption`1<System.Net.CookieContainer>, 
Microsoft.FSharp.Core.FSharpOption`1<Boolean>, 
Microsoft.FSharp.Core.FSharpOption`1<System.String>, 
Microsoft.FSharp.Core.FSharpOption`1<Microsoft.FSharp.Core.FSharpFunc`2
<System.Net.HttpWebRequest,System.Net.HttpWebRequest>>)'.
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] 
arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, 
Object[] parameters, Object[] arguments)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags 
invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at <StartupCode$TickSpec>.$TickSpec.createAction@212-1.Invoke()

FSharp.Data version 2.1.1.0.

In fsproj:

ToolsVersion is 14.0

TargetFrameworkVersion is v4.6.1

F# is 4.0.

I have a different AT set for another application, and I use the same method FSharp.Data.dlland the same one Http.Request, and they use F# 4.0, and I had no problems.

I don’t think there is a problem with dll, as I used it in the sample application and I was able to use this Http.Request method. I created a completely new solution, because, in my opinion, maybe I used the old version of FSharp.Core and still the same problem with FSharp.Data.

, , F#3.0 . F#3.0, , F#4.0 .

, ?

+4
2

app.config . . .. , .

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <startup>
    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" />
  </startup>
  <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
        <assemblyIdentity name="FSharp.Core" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-4.4.0.0" newVersion="4.4.0.0" />
      </dependentAssembly>
    </assemblyBinding>
  </runtime>
</configuration>
+2

, - F # 3.x FSI. script ( script), FSharp.Core ?

, TickSpec F3.x, .

+1

Source: https://habr.com/ru/post/1654136/


All Articles