5

I've implemented the RoleProvider class, there I created Domain class object which is in another assembly, my assembly has a reference to that one.

Error 3 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'. D:\Visual Studio 2013\Group 06\G06_Store\Store.Facade\StoreRoleProvider.cs 17 24 Store.Facade

How can I fix this error?

Soner Gönül
  • 97,193
  • 102
  • 206
  • 364
mr. Holiday
  • 1,780
  • 2
  • 19
  • 37

4 Answers4

8

open visual studio and go to tools bar open Nuget package manager and open nuget package manager console and install Entity framework just paste this into the console window:

Install-Package EntityFramework
Stephen Kennedy
  • 20,585
  • 22
  • 95
  • 108
6

1) Uninstall Entity Framework from All projects

2) Restart Visual Studio

3) Reinstalling Entity Framework to all required projects

and it started working

Moji
  • 5,720
  • 2
  • 38
  • 39
0

I've also found that if you have say a Console App as the main project, with a unit test project running on the side, this error will come up if you don't have a reference to EntityFramework on the unit test project you will get this error as well.

Mike Upjohn
  • 1,251
  • 2
  • 16
  • 38
0

Open Tools > NuGet Package Manager > Package Manager Console Then select the project name from Default Project in which you facing the above- mentioned error. Then simply install the below mentioned package :

install-package entityframework -version 6.0.0.0

Stephen Kennedy
  • 20,585
  • 22
  • 95
  • 108