Error : The EntityFramework package is not installed on project

asp.net-mvc asp.net-mvc-4 c# ef-migrations entity-framework

Question

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.
1
7
2/3/2014 5:40:48 PM

Accepted Answer

In Package Manger Console you have Default project dropdown list. Check that you select MonitoringN project in it and not the MonitoringN.Tests project.

30
2/3/2014 5:48:02 PM

Popular Answer

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.



Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow