1

I'm compiling an exe using the the F# --standalone option and one of the libraries it references uses the SqlProgrammabilityProvider in FSharp.Data.SqlClient. At runtime I get a "File Not Found" error from mscorlib.dll trying to load FSharp.Core. It occurs in the constructor of the ISqlCommand Implementation.

Note that to get the exe to compile at all with the --standalone option I had to download the source for FSharp.Data.SqlClient and compile it against F# 4.0. If I set Copy Local to true for FSharp.Core in FSharp.Data.SqlClient, then I get a duplicate type error instead of the file not found error at the same location when running the exe.

Is this a supported scenario? How can I get the provided type to reference the same "fake" FSharp.Core that is embedded in the exe by the --standalone flag?

ShawnMartin
  • 282
  • 2
  • 7
  • Have you tried to redirect the *FSharp.Core* binding? http://blog.ploeh.dk/2014/01/30/how-to-use-fsharpcore-430-when-all-you-have-is-431 – Mark Seemann Dec 29 '15 at 23:49
  • @MarkSeemann There was already a redirect for FSharp.Core that was added by something automaticly. I compiled with 4.0 not to avoid binding redirects, but because standalone works with quotations in 4.0, but not earlier versions. I've given up on this for now as the benefit just doesn't seem worth the effort, but thank you for the thought. – ShawnMartin Dec 30 '15 at 16:28
  • FWIW, I've had [my own troubles with that `--standalone` flag](http://stackoverflow.com/q/22593700/126014), and also gave up on it. – Mark Seemann Dec 30 '15 at 19:23

0 Answers0