fslaborg / Deedle

Easy to use .NET library for data and time series manipulation and for scientific programming
http://fslab.org/Deedle/
BSD 2-Clause "Simplified" License
939 stars 197 forks source link

System.MissingMethodException #307

Closed halcwb closed 9 years ago

halcwb commented 9 years ago

Using the latest nuget version of Deedle in a web project, I get the following error:

Method not found: 'Microsoft.FSharp.Core.FSharpOption`1<!!0> Deedle.Internal.Seq.headOrNone(System.Collections.Generic.IEnumerable`1<!!0>)'.
System.MissingMethodException

This happens in a web project. Referencing FSharp.Core or adding the dll manually to the bin folder doesn't resolve the problem. Note, I am using FSharp.Core 4.3.1.0 in my projects.

halcwb commented 9 years ago

Resolved the problem by adding the following redirect to the web.config:

<runtime>
  <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
    <dependentAssembly>
      <assemblyIdentity name="FSharp.Core" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
      <bindingRedirect oldVersion="2.0.0.0" newVersion="4.3.1.0" />
      <bindingRedirect oldVersion="2.3.5.0" newVersion="4.3.1.0" />
      <bindingRedirect oldVersion="4.0.0.0" newVersion="4.3.1.0" />
      <bindingRedirect oldVersion="4.3.0.0" newVersion="4.3.1.0" />
    </dependentAssembly>
  </assemblyBinding>
</runtime>

But these things are always a bit of a PITA. Are there more friendly solutions instead of having to manually adjust the app.config or web.config files?

tpetricek commented 9 years ago

Yes, this is PITA, but unfortunately, there is nothing we can do about this - if you want to learn more about this, have a look at: http://fsharp.github.io/2015/04/18/fsharp-core-notes.html