.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