Entity Framework for netcoreapp 3.1

leo del ciello 66 Reputation points

I want to write a simple Desktop WinForms application using Entity Framework to access Data .

My project file's contante is as follows :

<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">  

I tried installing from Nuget every possible version of EF but noone is compatible with netcoreapp 3.1

What should I do to use EF ? and moreover, is it possible to use it on netcore 3.1 ?

Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
694 questions
0 comments No comments
{count} votes

3 answers

Sort by: Most helpful
  1. Jack J Jun 24,276 Reputation points Microsoft Vendor

    @leo del ciello , Welcome to Microsoft Q&A, We need to make sure that we used .net 6.0 version when we want to use EF core in .NET Core app.

    Please refer to the following steps to use ef core in winform app.

    First. Please install .NET 6.0 from the following link:


    Second. Please change your project file into the following:

    <Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">  

    Third, Please install the latest version nuget package like the following:


    Finally, you could use ef core in your winform project.

    Best regards,

    If the answer is the right solution, please click "Accept Answer" and upvote it.If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

  2. Frabrizio contin 1 Reputation point

    Always do you select the same nuget package than your version framework.
    In my case i have net 5.0 framework and i selected only nuget library in 5.X.X (RED)
    In your case you must selected only 3.x.x Or update your framework to 7.XXX and install nuget in 7.XX (Green)


  3. leo del ciello 66 Reputation points

    For anyone who might be interested : I just discovered VS 2019 Community (which I was using) does not support .Net 6.0.

    I installed VS 2022 Community and now I can use Entity Framework Core 7.0.

    0 comments No comments