install Microsoft.EntityFrameworkCore.Tools from NuGet packages, then try to run Add-Migration on the package manager console. Hope it helps.
Getting an error :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.
Shyamali Mishra
0
Reputation points
Tried trouble shooting , verfied DB context class. Reinstalled Vs after troubleshooting and getting answers saying there is a problem with package manager .
2 answers
Sort by: Most helpful
-
-
Ian Xue 37,276 Reputation points Microsoft Vendor
2023-05-22T01:19:02.7+00:00 Hi
Add-Migration is part of Microsoft.EntityFrameworkCore.Tools. You can install the package from NuGet.
dotnet add package Microsoft.EntityFrameworkCore.Tools --version 7.0.5
https://www.nuget.org/packages/Microsoft.EntityFrameworkCore.Tools/
Best Regards,
Ian Xue
If the Answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.