0

I have A project in Xamarin Form and i'm Using Sqlite Database in it and Now i want to convert this Sqlite to Microsoft.EntityFrameworkCore.Sqlite but i i found this Exception.

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.

i have 3 project in my project that target .NET FrameWork 4.5 but Microsoft.EntityFrameworkCore.Sqlite Require .NET Standered 2.0 .I stuck in it.

kk.
  • 3,747
  • 12
  • 36
  • 67
Zubair Munir
  • 458
  • 3
  • 22

1 Answers1

0

You need to convert your PCL project to .Net Standard project in order to use Entity framework Core.

VahidShir
  • 2,066
  • 2
  • 17
  • 27
  • I want to Convert .NET Standered to .NET Core and Use EntityFrameWork.SQLite – Zubair Munir Jun 19 '19 at 13:08
  • 2
    This [adapted Xamarin.Forms Todo Sample](https://github.com/cwrea/XamarinTodo/tree/NETStd20_EFCore203) use Entity Framework Core for accessing SQLite and is a .NET Standard 2.0 project. – Benl Jun 19 '19 at 13:18
  • One other thing i want to tell you that i have existing project that is completed in .Net Stander with Sqlite Now i want to Convert .NET Core with Microsoft.EntityFrameworkCore.Sqlite – Zubair Munir Jun 19 '19 at 13:25
  • I Want to Upgrade .Net Standered to .NET Core to Existing PRoject – Zubair Munir Jun 19 '19 at 13:30
  • 2
    [How is .NET Standard different from .NET Core?](https://github.com/dotnet/standard/blob/master/docs/faq.md#how-is-net-standard-different-from-net-core): ".NET Standard is a specification", ".NET Core is a concrete .NET platform and implements the .NET Standard." – Benl Jun 19 '19 at 14:00
  • I'm Confused Actually i want to Use EntityFramework sqlite core insted Sqlite. When i,M Installing EntityFrameWork Then Above Exception Come and failed to install EntityFrameWork Sqlite Core – Zubair Munir Jun 19 '19 at 14:04
  • Im Facing This Problem to changing the target Framework https://stackoverflow.com/questions/35041291/remove-ios-windows8-and-wp8-from-xamarin-forms-pcl-nuget-3-0-opt-into-error – Zubair Munir Jun 19 '19 at 15:05