未找到匹配命令的可执行文件 "dotnet-tool"

No executable found matching command "dotnet-tool"

我正在尝试使用以下命令(在站点提供)从 official site 安装 Fake

dotnet tool install fake-cli -g

但我收到以下错误:

No executable found matching command "dotnet-tool"

我的 dotnet 版本是 2.1.201,我是 运行 Windows 10 Professional,具有所有最新更新。

dotnet tool 命令仅随 .NET Core SDK 版本 2.1.300 及更高版本一起安装。您需要更新 SDK 才能使用此命令。

除了

检查安装的 .NET Core SDK 版本 运行

dotnet --info

即使安装了所需的 SDK 版本,您可能还需要通过设置 global.json 中的 sdk 部分来切换到所需的 dotnet 核心 SDK 版本,如 , 例如

{
   "sdk": { "version": "2.1.403"  }
}