I created an UWP app and I will use entityFrameworkCore to create my DB with code first. My app console (entityFrameworkCore app) works and creates my DB but when I make a reference to my UWP project it doesn't work and shows this error:
The project uwp is not compatible with netcoreapp2.1(.NETCoreApp,version=v2.1)
And when i would like add a reference in uwp to db project i have this error enter image description here
A .NET Core app cannot add a reference to a UWP app and vice versa.
What you should do is to create a .NET Standard project where you install Entity Framework Core and define your DbContext
.
You could then reference this project from both the .NET Core console app and from the UWP app.
UWP isn't supported in .net core so creating .net core app won't work. create .net standart console app and include it into your UWP project