ZZZ Code AI
Report Issues
Suggest Features
Login
EF Core Tools
Chat
Code Explain
More Tools
How to fix in EF Core: The term 'Add-Migration' is not recognized as the name of a cmdlet, function, script file, or operable program.
<div class="h9">Exception Message:</div> <pre><code>PM> Add-Migration AddingEFExtensions 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 AddingEFExtensions + ~~~~~~~~~~~~~ + CategoryInfo : ObjectNotFound: (Add-Migration:String) [], CommandNotFoundExc eption + FullyQualifiedErrorId : CommandNotFoundException </code></pre> <div class="image-outer"><img src="https://www.learnentityframeworkcore.com/images/efcore/migrations/add-migration/troubleshooting-the-term-add-migration-is-not-recognized-as-the-name-of-a-cmdlet.png" loading="lazy" alt="Exception - The term Add Migration is not recognized"></div> <div class="h9">Cause:</div> <p>This error arises when the <a href="https://www.nuget.org/packages/Microsoft.EntityFrameworkCore.Tools">Microsoft.EntityFrameworkCore.Tools</a> package is not referenced in your <code>Migrations Project</code>.</p> <div class="h9">Solution:</div> <p>Make sure you have installed or referenced the <a href="https://www.nuget.org/packages/Microsoft.EntityFrameworkCore.Tools">Microsoft.EntityFrameworkCore.Tools</a> package in your <code>Migrations Project</code>.</p> <p>You can add this package via the NuGet Package Manager with:</p> <pre><code>Install-Package Microsoft.EntityFrameworkCore.Tools </code></pre> <p>Or through the .NET CLI with:</p> <pre><code>dotnet add package Microsoft.EntityFrameworkCore.Tools </code></pre>
Sponsored by
Entity Framework Extensions
This field is required
A text with a minimum of 10 characters is required
Send
Legal & Licensing
Answer generated by AI may produce inaccurate information about code, people, facts, and more.
Advertising Break!
5
seconds left
Did you know...
That you can now sponsor this project on
GitHub
?