Add Migration gives "Unable to resolve project from ..."

Using EF7 in an ASP.NET 5 project, I tried to add migration by typing the following command in the VS Package Manager console:

dnx ef migrations add InitialDatabaseSetup

And I got the error:

Unable to resolve project from C:\Projects\ASPNET5DEMO

The project is inside C: \ Projects \ ASPNET5DEMO \ src \ aspnet5demo.web

If you use the Developer Command Prompt command to go to this path, and then run the command, then everything will be fine ...

Is there a way to use the package manager console?

+4
source share
1 answer

The package manager console is just a powershell host. If you type pwd, you will see the current directory C:\Projects\ASPNET5DEMO.

, :

dnx -p src\aspnet5demo.web ef migrations add InitialDatabaseSetup

cd src\aspnet5demo.web
dnx ef migrations add InitialDatabaseSetup
+7

Source: https://habr.com/ru/post/1618824/


All Articles