Efcore: dotnet ef Could not execute because the specified command or file was not found

Created on 10 Feb 2020  路  4Comments  路  Source: dotnet/efcore

_This issue has been moved from a ticket on Developer Community._


In angular + asp.net core 3.1 project, I am getting this error, whenever I try to access anything related to EF.

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

Everything was working fine before. Due to some error I downloaded my old package of the project from GitHub and pasted, and now getting this error.

I have already set environment variables too

Error in dotnet CLI + .csproj file setup

My environmental variable set up

Working in System cmd but not in asp.netcoreCLI

Image:https: i.stack.imgur.com=


Original Comments

Visual Studio Feedback System on 2/2/2020, 07:31 PM:

We have directed your feedback to the appropriate engineering team for further evaluation. The team will review the feedback and notify you about the next steps.


Original Solutions

(no solutions)

closed-question customer-reported

Most helpful comment

The problem went away after starting VS code in admin mode

All 4 comments

The dotnet ef command is now shipped separately as a global tool. See https://docs.microsoft.com/en-us/ef/core/what-is-new/ef-core-3.0/breaking-changes#dotnet-ef

_This issue has been moved from a ticket on Developer Community._

In angular + asp.net core 3.1 project, I am getting this error, whenever I try to access anything related to EF.

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

Everything was working fine before. Due to some error I downloaded my old package of the project from GitHub and pasted, and now getting this error.

I have already set environment variables too

Error in dotnet CLI + .csproj file setup

My environmental variable set up

Working in System cmd but not in asp.netcoreCLI

Image:https: i.stack.imgur.com=

Original Comments

Visual Studio Feedback System on 2/2/2020, 07:31 PM:

We have directed your feedback to the appropriate engineering team for further evaluation. The team will review the feedback and notify you about the next steps.

Original Solutions

(no solutions)

Facing the same issue. I'm working on .net core 3.1.0
After installing dotnet-ef globally, when i try to look up for the features by running
dotnet ef -h
i get these errors
1
2

The problem went away after starting VS code in admin mode

Delete your debug folder and try dotnet tool install --global dotnet-ef again

Was this page helpful?
0 / 5 - 0 ratings