我一直在不同的操作系统中尝试测试 dotnet core 3,如Windows和Linux(Ubuntu)。它们都与 EF Core 协同工作正常!
但是,我决定给Windows WSL - Windows Subsystem for Linux一个机会,看看它的表现。这就是为什么我来这里的原因!
WSL 和 Ubuntu 18.04 的问题是:
我全局安装了 EF Core 并重新启动终端。* 到此为止,EF 版本为 3.1.4
> dotnet tool install --global dotnet-ef
当我尝试运行任何
dotnet ef
命令时,会出现以下错误:> dotnet ef database update
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 WSL和Ubuntu 18.04时遇到了相同的错误?