【问题标题】:VS Code terminal does not recognize dotnet efVS Code 终端无法识别 dotnet ef
【发布时间】:2022-01-18 00:34:35
【问题描述】:

在 VS Code 终端上运行以下命令时出现错误

dotnet ef -h

这是错误:

Could not execute because the specified command or file was not found.
Possible reasons for this include:
  * You misspelled a built-in dotnet command.
  * You intended to execute a .NET Core program, but dotnet-ef does not exist.
  * You intended to run a global tool, but a dotnet-prefixed executable with this name could not be found on the PATH.

但是在 Windows 的 cmd 上一切正常。 基于this question,我确信PATH 已在环境变量中正确定义。

【问题讨论】:

    标签: visual-studio-code .net-core


    【解决方案1】:

    添加 EntityFrameworkCore Tools 包。

    dotnet add package Microsoft.EntityFrameworkCore.Tools
    

    【讨论】:

      猜你喜欢
      • 2017-12-05
      • 2022-11-29
      • 2020-09-02
      • 2020-01-12
      • 2021-08-26
      • 2020-09-08
      • 1970-01-01
      • 2022-10-05
      • 2020-08-02
      相关资源
      最近更新 更多