SqlEntityConnection can't find edmgen.exe when compiling on mac osx with mono

221 views Asked by At

I have a very simple code that uses the SqlEntityConnection type provider.

basically something like this

open System.Data.Linq
open System.Data.Entity
open Microsoft.FSharp.Data.TypeProviders

type private EntityConnection = SqlEntityConnection<ConnectionString="ConnectionString",
                                                Pluralize = true>

which compiles fine on Windows, but when I try to compile it on Mac OSX, it fails with this error

The type provider 'Microsoft.FSharp.Data.TypeProviders.DesignTime.DataProviders' reported an error: Error reading schema. The required tool '/Library/Frameworks/Mono.framework/Versions/4.0.1/lib/mono/4.5/edmgen.exe' could not be found.

I looked everywhere, and I can't seem to find edmgen.exe anywhere. Is it supposed to be installed with mono? I Installed MDK 4.0.1.44, and edmgen.exe isn't there. What am I missing?

1

There are 1 answers

1
ahmelsayed On BEST ANSWER

After a lot of trials which included copying edmgen.exe from a Windows machine along with all the EntityFramework dlls, it still didn't work. This particular TypeProvider is tied to a very old version of EntityFramework that ships with the .NET framework, and doesn't work on Mono.

I tried SQLProvider which compiles fine with Mono, but is really buggy especially with groupby and count in the query. Anyway, I gave up trying to run the thing on Mono. I may give it another try once EntityFramework 7 is out since it'll officially support Mono.