Hi, I'm adding a new class in my asp.net 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?
Thanks.
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": {
"Microsoft.EntityFrameworkCore.Tools.DotNet":"1.0.0"
},
take a look at this link
It shows similar issue which this solution.
Thanks vikas_jk.
Subscribe to our weekly Newsletter & Keep getting latest article/questions in your inbox weekly