EF Core 支援的 .NET 實作.NET implementations supported by EF Core

我們想要 EF Core 在您可撰寫 .NET 程式碼的任何位置都可以使用,因此仍然朝該目標努力中。We want EF Core to be available anywhere you can write .NET code, and we're still working towards that goal. 當 EF Core 對 .NET Core 及 .NET Framework 的支援皆已涵蓋在自動化測試內,且已知有許多應用程式能夠正常加以使用時,Mono、Xamarin 及 UWP 仍存在問題。While EF Core's support on .NET Core and .NET Framework is covered by automated testing and many applications known to be using it successfully, Mono, Xamarin and UWP have some issues.


下表提供每個 .NET 實作的指導:The following table provides guidance for each .NET implementation:

.NET 實作.NET implementation 狀態Status EF Core 1.x 需求EF Core 1.x requirements EF Core 2.x 需求 (1)EF Core 2.x requirements (1)
.NET Core (ASP.NET Core主控台 等等).NET Core (ASP.NET Core, Console, etc.) 完整支援與建議。Fully supported and recommended .NET Core SDK 1.x.NET Core SDK 1.x .NET Core SDK 2.x.NET Core SDK 2.x
.NET Framework (WinForms、WPF、ASP.NET、主控台 等等).NET Framework (WinForms, WPF, ASP.NET, Console, etc.) 完整支援與建議。Fully supported and recommended. 也可以使用 EF6 (2)EF6 also available (2) .NET Framework 4.5.1.NET Framework 4.5.1 .NET Framework 4.6.1.NET Framework 4.6.1
Mono 和 XamarinMono & Xamarin 進行中 (3)In progress (3) Mono 4.6Mono 4.6
Xamarin.iOS 10Xamarin.iOS 10
Xamarin.Mac 3Xamarin.Mac 3
Xamarin.Android 7Xamarin.Android 7
Mono 5.4Mono 5.4
Xamarin.iOS 10.14Xamarin.iOS 10.14
Xamarin.Mac 3.8Xamarin.Mac 3.8
Xamarin.Android 7.5Xamarin.Android 7.5
通用 Windows 平台Universal Windows Platform 建議 EF Core 2.0.1 (4)EF Core 2.0.1 recommended (4) .NET Core UWP 5.x 套件.NET Core UWP 5.x package .NET Core UWP 6.x 套件.NET Core UWP 6.x package

(1) EF Core 2.0 將其設為目標,因此需要支援 .NET Standard 2.0 的 .NET 實作。(1) EF Core 2.0 targets and therefore requires .NET implementations that support .NET Standard 2.0.

(2) 請參閱比對 EF Core 與 EF6 來選擇正確的技術。(2) See Compare EF Core & EF6 to choose the right technology.

(3) Xamarin 有一些問題與已知限制,可能會使某些使用 EF Core 2.0 開發的應用程式無法正常運作。(3) There are issues and known limitations with Xamarin which may prevent some applications developed using EF Core 2.0 from working correctly. 請查看待處理的問題清單,以了解因應措施。Check the list of active issues for workarounds.

(4) 請參閱此文章的通用 Windows 平台一節。(4) See the Universal Windows Platform section of this article.

通用 Windows 平台Universal Windows Platform

舊版 EF Core 與 .NET UWP 有許多相容性問題,其中以 .NET Native 工具鏈編譯的應用程式問題最多。Earlier versions of EF Core and .NET UWP had numerous compatibility issues, especially with applications compiled with the .NET Native toolchain. 新版 UWP 新增了 .NET Standard 2.0 的支援且包含 .NET Native 2.0,這能夠修正上述提到的大多數相容性問題。The new .NET UWP version adds support for .NET Standard 2.0 and contains .NET Native 2.0, which fixes most of the compatibility issues previously reported. EF Core 2.0.1 已採用 UWP 進行更全面的測試,但測試並非自動進行。EF Core 2.0.1 has been tested more thoroughly with UWP but testing is not automated.

在 UWP 上使用 EF Core 時:When using EF Core on UWP:

回報問題Report issues

如有任何組合無法如預期運作,我們鼓勵您在 EF Core 問題追蹤器建立新的問題。For any combination that doesn’t work as expected, we encourage creating new issues on the EF Core issue tracker. 若為 Xamarin 相關的問題,請使用 Xamarin.AndroidXamarin.iOS的問題追蹤器。For Xamarin-specific issues use the issue tracker for Xamarin.Android or Xamarin.iOS.