欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  IT编程

.net core EFCore CodeFirst 迁移出现【No project was found. Change the current working directory or use the --project option. 】

程序员文章站 2022-10-18 12:52:46
解决方法 定位到csproject 文件夹 问题解决 接下来正常进行CodeFirst操作:生成Migration [name] Upate Database 来源: ......

.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"

 问题解决

.net core EFCore CodeFirst 迁移出现【No project was found. Change the current working directory or use the --project option. 】

接下来正常进行codefirst操作:生成migration [name] upate database

pm> add-migration test
pm> update-database

来源:

https://github.com/aspnet/entityframework.docs/issues/737

 .net core EFCore CodeFirst 迁移出现【No project was found. Change the current working directory or use the --project option. 】

.net core EFCore CodeFirst 迁移出现【No project was found. Change the current working directory or use the --project option. 】