我已经使用SQLite的Xamarin表单现在我想使用Microsoft.EntityFrameworkCore.Sqlite

时间:2019-06-19 11:54:02

标签: xamarin.forms entity-framework-core

我有一个Xamarin形式的项目,我正在其中使用Sqlite数据库,现在我想将此Sqlite转换为Microsoft.EntityFrameworkCore.Sqlite,但我发现了此异常。

Severity    Code    Description Project File    Line    Suppression 
State
Error       Could not install package 'Microsoft.EntityFrameworkCore.Sqlite 3.0.0-preview6.19304.10'. You are trying to install this package into a project that targets '.NETPortable,Version=v4.5,Profile=Profile259', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.

我的项目中有3个项目面向.NET FrameWork 4.5,但是Microsoft.EntityFrameworkCore.Sqlite要求 .NET Standered 2.0

1 个答案:

答案 0 :(得分:0)

您需要convert your PCL project to .Net Standard project才能使用Entity Framework Core。