No project was found, change the current working directory or use the --project option

Hi, I'm adding a new class in my core 2 project and this class is mapped to one of the table in database, I want to use migrations to create the table from my model,
 So I was running this command as shown below in the image:


but it shows error "No project was found. Change the current working directory or use the --project option".what should i do to resolve this error?


Asked by:- LuneAgile
: 14283 At:- 12/17/2018 11:04:19 AM
ASP.NET ASP.NET-Core-2 EF-Migrations-error

2 Answers
profileImage Answered by:- vikas_jk

Looks like you are not pointing to current directory, if it's correct, try to change the directory using console

PM> cd E:\Projects\YourProject\
PM> dotnet ef migrations add InitialMigration

If that doesn't work, try using Entity framework Core preview version

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

instead of

"tools": {

take a look at this link

It shows similar issue which this solution.

At:- 12/18/2018 2:23:46 PM

profileImage Answered by:- LuneAgile

Thanks vikas_jk.

At:- 12/19/2018 8:39:26 PM
Which solution worked for you from the above two? can you let me know? thanks 0
By : vikas_jk - at :- 12/21/2018 11:40:57 AM

Login/Register to answer
Register directly by posting answer/details

Full Name *

Email *

By posting your answer you agree on privacy policy & terms of use