简体   繁体   中英

Could not add a migration in ef

I am trying to add a migration in a Visual Code in ef using the following syntax:

dotnet ef migrations add A_isVerified

All I get is this:

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.

What can I do to resolve this?

Remember to add Microsoft.EntityFrameworkCore.Design as a package in your project. See more at https://docs.microsoft.com/en-us/ef/core/miscellaneous/cli/dotnet

dotnet tool install -g dotnet-ef

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM