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

前端 未结 6 2026
萌比男神i
萌比男神i 2020-12-28 13:28

I am using Visual Studio 2015 and dotnet core and trying to develop an EF Core Code First project using Sqlite and this documentation / tut

6条回答
  •  忘掉有多难
    2020-12-28 14:12

    Just faced similar issue. Fixed by downgrading to 1.0.0-preview3-final

    "tools": {
         "Microsoft.EntityFrameworkCore.Tools.DotNet": "1.0.0-preview3-final",    
    }
    

    and changing --project param to --startup-project

    dotnet ef --startup-project  migrations add 
    

    In global.json I also downgraded version to

     "sdk": {
         "version": "1.0.0-preview2-003131"
     }
    

    This might be a temp workaround before migrating to csproj.

提交回复
热议问题