.net core EFCore CodeFirst 遷移出現錯誤【No project was found. Change the current working directory or use the --project option. 】


PM> dotnet ef Migrations add Init No project was found. Change the current working directory or use the --project option.

 解決方法 定位到csproject 文件夾

PM> dotnet ef migrations script --verbose -i --project "E:\Web\Website\Website.MVC"

 問題解決

接下來正常進行CodeFirst操作:生成Migration [name] Upate Database

PM> add-migration test
PM> update-database

來源:

https://github.com/aspnet/EntityFramework.Docs/issues/737

 

 

pass:我會經常修改 不希望被轉載!


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM