The term 'Add-migration' is not recognized - VS2017 and EntityFrameworkCore

Ask picture Ask · Feb 22, 2017 · Viewed 28.3k times · Source

I am posting this question just in case the solution I found would help someone else out. While working in Visual Studio 2017 rc4 each time I tried to run the Add-Migration command in the Package Manager console I get the following error:

The term 'Add-migration' is not recognized...

Answer

Ask picture Ask · Feb 22, 2017

The solution that worked for me after trying a whole raft of other solutions posted, was to:

  • right click on my project
  • select Manage Nuget Packages
  • select the browse tab
  • thick Include prerelease check box
  • install the Microsoft.EntityFrameworkCore.Tools

N.b that aspnetcore project in visual studio 2017 do not seem to have the project.json file.