首页 > 解决方案 > dotnet-ef 安装后还是找不到

问题描述

dotnet-ef在 Ubuntu 服务器上安装了该工具,并且安装成功。但是,仍然没有找到该程序:

~/app$ dotnet --version
3.1.201
~/app$ dotnet tool install --global dotnet-ef --version 3.1.3
Since you just installed the .NET Core SDK, you will need to logout or restart your session before running the tool you installed.
You can invoke the tool using the following command: dotnet-ef
Tool 'dotnet-ef' (version '3.1.3') was successfully installed.

重启服务器后:

~/app$ dotnet-ef migrations add "First On Server"
dotnet-ef: command not found
~/app$ which dotnet
/usr/bin/dotnet
~/app$ which dotnet-ef
~/app$

如何dotnet-ef在 Ubuntu 机器上获取该工具?

标签: .net-coreef-core-3.1

解决方案


dotnet tool install命令需要提升!


推荐阅读