在使用mono的mac osx上编译时,SqlEntityConnection找不到edmgen.exe

时间:2015-06-12 07:27:01

标签: entity-framework f# mono type-providers

我有一个使用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不存在。我错过了什么?

1 个答案:

答案 0 :(得分:1)

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

我尝试使用Mono编译好的SQLProvider,但是在查询中尤其是groupbycount非常错误。无论如何,我放弃了尝试在Mono上运行这个东西。一旦EntityFramework 7出现,我可以再试一次,因为它正式支持Mono。

相关问题