5
votes

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?

4
By adding the reference of EntityFramework in your project. - Sachin
I've got nuget package in my project - mr. Holiday

4 Answers

7
votes

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
6
votes

1) Uninstall Entity Framework from All projects

2) Restart Visual Studio

3) Reinstalling Entity Framework to all required projects

and it started working

0
votes

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.

0
votes

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