I've just installed SQL Server 2008, configured my ASP.NET MVC 4 project to be deployed at Local IIS and have added a new connection to a database which have been created at time (in sql server 2008).
When I try to enable migrations (Entity Framework) via Enable-Migrations -ContextTypeName MonitoringNDataContext from Package Manager Console. I got this following error :
The EntityFramework package is not installed on project 'MonitoringN.Tests'.
Any brilliant idea, please ?
- MonitoringN : Name the ASP.NET MVC 4 project.
- MonitoringNDataContext : Name of my DBContext class which is placed into MonitoringN.
- MonitoringN.Tests : Name of the Unit Test project related to MonitoringN.
In Package Manger Console you have Default project dropdown list. Check that you select MonitoringN project in it and not the MonitoringN.Tests project.
In the Package Manager Console, choose the default project to the your project which has dbcontext. If this is set incorrectly, you will get The EntityFramework package is not installed on project 'x'. Change the dropdown to your EF project.
This worked for me.