I want to create a console application with EF Core by following this tutorial: http://ef.readthedocs.io/en/latest/platforms/full-dotnet/new-db.html.
My problem is, I cannot execute the statement
Add-Migration
as described in the tutorials. It shows me:
PM> Add-Migration MyFirstMigration
Cannot execute this command because 'Microsoft.EntityFrameworkCore.Tools' is not installed in project 'src\AppEf'. Add 'Microsoft.EntityFrameworkCore.Tools' to the 'tools' section in project.json. See http://go.microsoft.com/fwlink/?LinkId=798221 for more details.
All added assemblies:
What is wrong?
Update
The statement dotnet restore
works and dotnet-ef --help
does not work at all.
And you can see, the statement is execute in project folder.
Microsoft.EntityFrameworkCore.Tools
listed underdependencies
inproject.json
. What the message is telling you is it needs to be undertools
. (It probably should be in both places - not sure I'm still in the process of migrating to RTM.) – Davidproject.json
. Add a "tools" object/section and add "Microsoft.EntityFrameworkCore.Tools" to it. – DavidCould not find a part of the path 'C:\Users\user\.nuget\packages\.tools\Microsoft.EntityFrameworkCore.SqlServer'.
– softshipper