EF Core 2.0 Migrations Not Recognized by Package Manager Console

.net-core-2.0 ef-migrations entity-framework-core

Question

I'm trying to add a migration for a .net core 2.0 web app through the package manager console in visual studio 2017. I receive the error: "The EntityFramework package is not installed on project ". However, EntityFrameworkCore 2.0 is installed.

I've tried:

  • the enable-migrations command (although I don't believe this is necessary anymore)
  • the add-migration command
  • "Install-Package Microsoft.EntityFrameworkCore.SqlServer -Version 2.0.0" through the PMC
  • re-installing entityframeworkcore 2.0 through the NuGet package manager

Is there some other configuration that needs to be done somewhere else?

Since EF Core migrations work on my .Net Core 1.1 project could this issue be related to .Net Core 2.0?

Cheers!

1
1
8/17/2017 11:24:46 PM

Popular Answer

It looks like the EF6 commands are running. You can unload them with the following command.

Remove-Module EntityFramework

The EF Core PMC commands should be available to use after installing the following package.

Install-Package Microsoft.EntityFrameworkCore.Tools
1
8/22/2017 3:51:07 PM


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