I cannot add ADO.NET Entity Data Model to C# console APP

Juan Dent 236 Reputation points
2022-07-16T17:01:00.84+00:00

221270-image.png

The project's target framework does not contain Entity Framework runtime assemblies. Please review the target framework information in the project's property page...

When I right click on the project, there is no Add Reference... option, only Add Project Reference.. so I cannot add any assemblies!!

Please help!!

Developer technologies .NET Other
{count} votes

1 answer

Sort by: Most helpful
  1. Jack J Jun 25,296 Reputation points
    2022-07-18T02:21:49.433+00:00

    @Juan Dent , Welcome to Microsoft Q&A, based on your picture, I find that your current app is a .net core console app.

    As usual, Entity Framework is used for .NET Framework app. Also, Entity Framework Core is used for .NET Core app.

    We need to use Entity Framework Core instead of Entity Framework.

    However, we could see Microsoft Explained about the following sentence:

    EF Core does not support the EDMX file format for models.

    Therfore, you could refer to the Microsoft doc Getting Started with EF Core on ASP.NET Core with an Existing Database to scaffold a database context from an existing database or create a new model and use migrations to create and update databases.

    Hope the above link could help you.

    Best Regards,
    Jack


    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.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.