Base solution for your next web application
Open Closed

EF not found when running add-migration on PMC #11396


User avatar
0
Leonardo.Willrich created

Hi,

I have a project on an MVC Core + JQuery template, version 9.0.1. Sometimes, when I need to add a new migration (Code First) using EF Tools, it says in the Package Manager Console that the Entity Framework was not found. To fix that, I have to install the EntityFramework package and uninstall (install-Package Entityframework). It works for a moment and then the error comes up next time I need to add a new migration.

Any idea how to resolve it?

Kind regards, Leonardo Willrich.

Markdown is supported
Copy & paste or drag & drop images (max 30 MB per image)

5 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    If I understand the problem correctly, you need to install https://learn.microsoft.com/en-us/ef/core/cli/dotnet

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)
  • User Avatar
    0
    Leonardo.Willrich created

    Hi Ismcagdas,

    The packages are already installed. This is a very odd issue. It s working, and suddenly it stops. And the solution is to install EntityFramework package, uninstall it, save the project, restart VS, and then the PMC commands are back to work.

    See my packages:

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    Could you share a screenshot of the error next time you face this error ?

    Thanks,

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)
  • User Avatar
    0
    Leonardo.Willrich created

    Yes, I can. Recently I haven't changed too much the project entities. I'll let you know when it is happening again.

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Thanks. Waiting for your reply then.

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)