2015-06-12 104 views
2

我有一個非常簡單的代碼,它使用SqlEntityConnection類型的提供程序。在單聲道mac osx上編譯時,SqlEntityConnection無法找到edmgen.exe

基本上是這樣的

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

經過大量的試驗,其中包括從Windows機器複製edmgen.exe以及所有EntityFramework dll,它仍然無法正常工作。這個特定的TypeProvider綁定到.NET框架附帶的非常舊的EntityFramework版本,並且不適用於Mono。

我試過SQLProvider,它與Mono編譯得很好,但是確實是bug,特別是在查詢中有groupbycount。無論如何,我放棄了試圖在Mono上運行這個事情。我可以再次嘗試EntityFramework 7,因爲它會正式支持Mono。

+0

從那以後你有沒有找到合理的解決方案? – mateuszlewko