The type ‘System.Data.Entity.DbContext’ is defined in an assembly that is not referenced. You must add a reference to assembly ‘EntityFramework 2

  1. Go to Tools » NuGet Package Manager » Manage NuGet Packages For Solution.
  2. Ensure that Browse is selected and type “entityframework” into the search box. and install the entity framework

Check if its exist in package.config <package id=”EntityFramework” version=”6.2.0″ targetFramework=”net461″ /> exist

Leave a comment