Details error:
PM> Add-Migration 'Intialize Database'
Add-Migration : The term 'Add-Migration' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the
path is correct and try again.
At line:1 char:1
+ Add-Migration 'Intialize Database'
+ ~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (Add-Migration:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
Solution
Simply, install Microsoft.EntityFrameworkCore.Tools
package from nuget:
Install-Package Microsoft.EntityFrameworkCore.Tools -Version 3.1.6
You can also use this link to install the latest version: Nuget package link
Tips: Install latest stable version.
Sometimes, the error persists because of cache, so restart can solve the issue without doing anything.