FSharp.Data.SqlClient "Method Not Found"

344 views Asked by At

Getting this strange error when i try to use FSharp.Data.SqlClient type provider on Windows Azure Emulator, VS2013, F# 3.1->

Additional information: Method not found: 'Microsoft.FSharp.Core.FSharpFunc2<System.Object[],System.Object> FSharp.Data.SqlClient.QuotationsFactory.GetMapperWithNullsToOptions(Microsoft.FSharp.Core.FSharpFunc2, Microsoft.FSharp.Core.FSharpFunc`2)

The error happens when i try to call the function that uses my SqlCommandProvider types.

Doesn't make any sense. When i run my test suite which fully covers this method, it 100% works. When i run azure emulator it breaks.

I have my worker role referencing all the same DLLs that the test suite is using as well...?

1

There are 1 answers

1
Martin On

Azure has a problem with f# 3.1 (mainly that it is normally not installed). If you set your FSharp.Core reference to copy local = True in your references for the web project it should copy it as part of the shipped dlls. The other thing you may need to add then is add an assembly binding redirect in your web.config in order to allow the resolution to this file at runtime. Details for this can be found here.