dingshuanglei

No project was found. Change the current working directory or use the --project option

No project was found. Change the current working directory or use the --project option

  执行dotnet ef migrations createmodel、dotnet ef migrations add initial等命令出错,报错信息为:No project was found. Change the current working directory or use the --project option.命令出错。个人百度.net core、dotnet ef migrations createmodel、dotnet ef migrations add initial、No project was found. Change the current working directory or use the --project option关键字都未发现这个问题的解决办法,最后使用必应国内版,搜索No project was found. Change the current working directory or use the --project option.关键字,得到了解决办法。

  第一种:dotnet ef migrations add InitialCreate --project="C:\path_to_my_project\MyProject.csproj"   使用这样的命令操作,在我写的代码没有作用,依然报出之前的问题;

  第二种:PM> cd "D:{path_to_your_projet}"  PM> dotnet ef migrations add initial 使用第二种方法解决了,不可以使用dotnet ef migrations createmodel、dotnet ef migrations add initial命令的问题。

   参考文章:Stack Overflow  GitHub

 

发表于 2018-11-30 13:27 文弱書生 阅读(...) 评论(...) 编辑 收藏
 

相关文章:

  • 2021-07-07
  • 2021-05-14
  • 2022-01-10
  • 2021-05-11
  • 2021-11-06
  • 2021-05-28
  • 2021-08-28
  • 2021-06-01
猜你喜欢
  • 2021-06-25
  • 2021-09-18
  • 2021-11-09
  • 2021-08-02
  • 2022-01-02
  • 2021-08-30
相关资源
相似解决方案