Error 4 The type 'System.Data.Entity.DbContext' is defined in an assembly that is not referenced

2

I have already looked for several solutions to this error on the internet and unfortunately nothing helped me.

Can anyone help me with how to resolve this error ??

  

Error 4 The type 'System.Data.Entity.DbContext' is defined in an   assembly that is not referenced. You must add a reference to assembly   'EntityFramework, Version = 6.0.0.0, Culture = neutral,   PublicKeyToken = b77a5c561934e089 '.

    
asked by anonymous 16.10.2014 / 17:27

2 answers

1

Open your Package Manager Console (on the Visual Studio menu: View Other Windows Package Manager Console ) and enter command:

  

Update-Package -reinstall EntityFramework

    
16.10.2014 / 20:21
0

In your project:

  • Right-click References > Add Reference ...
  • Select the Browse tab and click the Browse
  • Search the Folder of your project > packages > EntityFramework.X.XX. > lib
  • Choose EntityFramework.dll
  • Click% with%
  • Note: Perhaps in the lib folder you have folders for the DotNet version (choose the appropriate one for your project) and then the% dll with%.

    Source: link

        
    04.02.2015 / 01:34