简体   繁体   English

dotnet ef 在最新的 SDK 更新后不起作用

[英]dotnet ef not working after the latest SDK is updated

My system is: Ubuntu 20.04.我的系统是:Ubuntu 20.04。 zsh+ohmyzsh terminator kde zsh+ohmyzsh 终结者 kde

Recently when I wanted to run dotnet-ef migrations add Add_Minor_Fields I get:最近当我想运行dotnet-ef migrations add Add_Minor_Fields我得到:

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.

Then if I do: dotnet tool install --global dotnet-ef然后如果我这样做: dotnet tool install --global dotnet-ef

Tool 'dotnet-ef' is already installed.

What has changed since the last time I've run this:自从我上次运行它以来发生了什么变化:

  1. Possibly the new patch versions of SDK and ef tools are release可能SDK和ef工具的新补丁版本已经发布
  2. I've installed KDE我已经安装了 KDE

What can be the reason?可能是什么原因?

The location of dotnet gloabl tools should be in path dotnet gloabl 工具的位置应该在路径中

see:here见:这里

Linux/macOS: $HOME/.dotnet/tools Linux/macOS: $HOME/.dotnet/tools

Windows: %USERPROFILE%\.dotnet\tools Windows: %USERPROFILE%\.dotnet\tools

Try uninstalling dotnet-ef and then installing it.尝试卸载 dotnet-ef 然后安装它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 即使在安装 .NET 核心 SDK 后,Dotnet 命令也不起作用 - Dotnet commands not working even after installing .NET core SDK Ubuntu 19.10 中的 dotnet ef 迁移问题。 点网 SDK 3.1.1 - dotnet ef migrations issue in Ubuntu 19.10. Dotnet sdk 3.1.1 CLI“ dotnet ef”不适用于全新的dotnet核心Web项目 - CLI “dotnet ef” is not working for a brand new dotnet core web project “dotnet ef”命令在 .NET Core 2.2 中不起作用 - 'dotnet ef' command is not working in .NET Core 2.2 更新到 dotnet 6 后,dotnet run 无法正常工作 - dotnet run not working after update to dotnet 6 SaveChanges(EF数据库优先)后属性未更新 - Property not updated after SaveChanges (EF database first) EF Linq 从 dotnet Core 2.2.6 更改为 3.0.0 后出错 - EF Linq Error after change from dotnet Core 2.2.6 to 3.0.0 更新到最新版本Azure SDK后出错 - Error after updating to the latest version Azure SDK VideoFeed 不适用于使用最新 Windows SDK 的 MavicAir 2 - VideoFeed not working on MavicAir 2 with the latest windows SDK 'realpath(): Permission denied' 在 k8s 上的 dotnet/sdk:3.1-bullseye 容器中以非 root 身份运行 dotnet ef 命令时 - 'realpath(): Permission denied' when running dotnet ef command as non-root in dotnet/sdk:3.1-bullseye container on k8s
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM