Xamarin Forms and Entity Framework Core NetStandard

Xamarin recently announced NetStandard support (see https://releases.xamarin.com/stable-release-cycle-7-service-release-1/ ), and the recently submitted Entity Framework kernel supports NetStandard. There was a recent issue with the SQLite.Native package that was resolved (see https://github.com/aspnet/EntityFramework/issues/4269 ), but when I create the Android version of Xamarin Forms, it doesn't seem to include all the assemblies the output that is required by the Entity Framework, and therefore the application will not start and crashes in the first line of EF code to retrieve data. The UWP version works very well, so this seems like a problem with Android (maybe iOS too).

Has anyone come across this and knew about it so that the compiled Xamarin Forms Android application runs using the Entity Framework Core to access the SQLite database?

Thanks in advance.

+5
source share
2 answers

Below are the steps you can follow.

  • Create a Xamarin.Forms project.
  • Convert PCL project properties to .NET Standard 1.3 enter image description here
  • Install Core core platform and other EF Core components

I prepared a small hello world project on Github Here .

0
source

you must use -linkskip to tell the compiler not to delete links.

0
source

All Articles