1, the input of the underlined "-" format is not correct, check whether it is full-width input, mistakenly entered the underscore "_", or there are spaces before and after;
2. Do not refer to the EntityFramework command, please perform the following name (Import-module project Path \packages\entityframework.6.1.3 (EF version) \tools\ ENTITYFRAMEWORK.PSD1)
It is also important to note that when executing a command, the default project must select the project that contains the model
If none of the above is resolved, then perform the #2有提示:
Then you need to follow the instructions above, open cmd and go to PowerShell.
Execute First:
1. Cmd->powershell, enter the PowerShell mode, after successful, will appear on the left side of the command line PS Word;
2. Cmd->get-executionpolicy, see if our current scope has the command to execute PowerShell;
3. Cmd->get-executionpolicy-list View all current scopes
Ok, all scopes do not have permissions, then we need to set permissions to it, set permissions see the Fourth step
4.cmd->set-executionpolicy Remotesigned-scope CurrentUser, set the current user scope with permissions, the format is as follows: Set-executionpolicy- ExecutionPolicy <PolicyName>-scope <scope>
Ok, last set has permission, finally we are going to try Add-migration
The final execution was successful.
Powersheel Please refer to the official information: https://technet.microsoft.com/zh-CN/library/hh847748.aspx
Workaround: The "add-migration" item cannot be identified as a cmdlet, function, script file, or name of a executable program. Check the spelling of the name, if the path is included, make sure the path is correct, and then try again