Using EF7 on an ASP.NET 5 project I tried to add a migration typing the following on 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 use Developer Command Prompt to navigate to that path and then run the command then everything works fine ...
Is there a way to use Package Manager Console?
Package Manager Console is just a powershell host. If you type pwd
you'll see that it's current directory is C:\Projects\ASPNET5DEMO
.
Then you can access the relevant command by using;
dnx -p src\aspnet5demo.web ef migrations add InitialDatabaseSetup
or
cd src\aspnet5demo.web
dnx ef migrations add InitialDatabaseSetup
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With