UWP project not compatible with netcoreapp2.1

c# entity-framework-core netcoreapp2.1 uwp

Question

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

1
1
4/2/2019 9:17:15 AM

Accepted Answer

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.

0
4/2/2019 2:26:27 PM

Popular Answer

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



Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow