请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

Mac, 运行dotnet ef报错

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 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.

正在回答 回答被采纳积分+3

1回答

提问者 慕移动8056989 2023-06-15 12:12:04

网上找了帖子,说可能是因为dotnet-ef没装

dotnet tool install --global dotnet-ef


然后,又提示"/Users/[username]/.dotnet/tools"不在环境变量中,但是zsh给出了提示,运行一下代码

cat << \EOF >> ~/.zprofile

# Add .NET Core SDK tools

export PATH="$PATH:/Users/[username]/.dotnet/tools"

EOF


添加环境变量后,再运行dotnet ef,就显示可以用了

1 回复 有任何疑惑可以回复我~
问题已解决,确定采纳
还有疑问,暂不采纳
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号