使用单声道在 mac osx 上编译时,SqlEntityConnection 找不到 edmgen.exe

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

我有一个使用 SqlEntityConnection 类型提供程序的非常简单的代码。

基本上是这样的

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

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

在 Windows 上编译正常,但是当我尝试在 Mac OSX 上编译它时,它失败并出现此错误

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.

我找遍了,似乎找不到edmgen.exe。它应该与单声道一起安装吗?我安装了 MDK 4.0.1.44,edmgen.exe 不存在。我错过了什么?

经过大量试验(包括从 Windows 机器上复制 edmgen.exe 以及所有 EntityFramework dll,它仍然无法正常工作。这个特定的 TypeProvider 与 .NET Framework 附带的非常旧的 EntityFramework 版本相关联,并且不适用于 Mono。

我试过 SQLProvider,它可以用 Mono 编译得很好,但确实有问题,尤其是在查询中使用 groupbycount。无论如何,我放弃了尝试 运行 Mono 上的东西。一旦 EntityFramework 7 出来,我可能会再试一次,因为它将正式支持 Mono。