Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Update-Database command is missing in EF Core

  • Downloaded .NET Core template v3.4.0
  • From VS2017 Package Manager Console, I tried to autocomplete Update-Database command but this command does not exist!

https://i.sstatic.net/GtCcg.jpg

like image 306
alex Avatar asked Jun 02 '26 22:06

alex


2 Answers

Did you install the Microsoft.EntityFrameworkCore.Tools package?

Install-Package Microsoft.EntityFrameworkCore.Tools
Update-Database
like image 144
bricelam Avatar answered Jun 06 '26 06:06

bricelam


For EF Core, you can use dotnet ef database update in Command Prompt.

Run that in the EntityFrameworkCore folder in Command Prompt, not the VS command window.

like image 35
aaron Avatar answered Jun 06 '26 06:06

aaron