Error : The EntityFramework package is not installed on project

11,347

Solution 1

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

Solution 2

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.

Share:
11,347
user3264174
Author by

user3264174

Updated on July 27, 2022

Comments

  • user3264174
    user3264174 almost 2 years

    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.