今天使用dotnet命令行迁移数据,输入:

dotnet ef migrations add InitialCreate;

结果直接报错,如下:

dotnet ef 无法执行,因为找不到指定的命令或文件

这是因为:从 3.0 起,EF Core 命令列工具 (dotnet ef) 不在 .NET Core SDK 里面,需另装。命令如下:

dotnet tool install --global dotnet-ef

Over!

相关文章:

  • 2022-02-24
  • 2021-08-01
  • 2021-07-10
  • 2021-04-10
  • 2022-12-23
  • 2022-12-23
  • 2021-05-27
  • 2021-05-21
猜你喜欢
  • 2022-12-23
  • 2021-07-28
  • 2021-06-09
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案