环境描述:macOS 、vscode 、netcore3.0
迁移工具:Microsoft.EntityFrameworkCore.Tools
遇到的问题:
Could not execute because the specified command or file was not found.
解决办法:
因为dotnet正常(dotnet --version),猜测出现问题的部分应该是在EF,使用命令更新EF工具。
dotnet tool update --global dotnet-ef --version 3.0.0-preview7.19362.6
执行成功后,运行dotnet ef --version检测
扩展:core-cli命令行的使用
1、dotnet tool list -g 查看所有安装的工具,使用dotnet tool list若未找到安装的工具可能是因为未安装在当前路径
2、dotnet tool install -g [tool-name] 安装全局工具
3、dotnet tool update -g [tool-name] 更新工具