Closed alpersilistre closed 4 years ago
Your startup project 'BasicConsoleApp' doesn't reference Microsoft.EntityFrameworkCore.Design. This package is required for the Entity Framework Core Tools to work. Ensure your startup project is correct, install the package, and try again.
It seems that you have a new dotnet core sdk installed. The new core sdk has a reserved dotnet ef
command line tool that uses EFCore, so this conflicts with this repo's tool by name. As you can see from the readme, I changed the tool's name to dotnet ef6
from version 2.1.0. So you might have to install that and try with dotnet ef6
.
Yes, this was the problem. I updated to version 2.1.0 and typed 'dotnet ef6 database update' and it worked. Thank you for the guidance @mrahhal. I really appreciate it.
No worries.
Originally posted by @mrahhal in https://github.com/mrahhal/Migrator.EF6/issues/61#issuecomment-554323692
Hi @mrahhal, I am creating this issue based on your comment.
I downloaded Migrator.EF6 1.0.8 tag solution from the repo. I opened the solution in the VS2015 and unloaded WithIdentity and Migrator.EF6.Tools projects. I rebuilt the BasicConsoleApp project and ran
dotnet ef database update
command from the Package Manager Console inside the BasicConsoleApp project folder. It successfully created a DB that I can see on my local. Then I deleted the DB and opened the project in the VS2017. Visual Studio migrated project files to csproj and removed the project.json file as expected. After rebuilt, I ran the same commanddotnet ef database update
and it gives me the error that I mentioned in the issue.Your startup project 'BasicConsoleApp' doesn't reference Microsoft.EntityFrameworkCore.Design. This package is required for the Entity Framework Core Tools to work. Ensure your startup project is correct, install the package, and try again.
Then I add the deleted project.json file to the project as it was suggested in the previous issue but the same error occurred.
Then, I downloaded the 1.1.0 tag solution from the repo because it was already migrated to VS2017 (I read the changelog and it's say VS2017 support). I opened the solution in the VS2017 and unloaded the other 2 projects as I did before. Typed
dotnet ef database update
again but the error is still the same.It seems I am having trouble running EF migration in the VS2017. I would be glad to hear your suggestions. Thank you.