Reputation: 1800
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?
Upvotes: 5
Views: 20660
Reputation: 203
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
Upvotes: 0
Reputation: 81
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
Upvotes: 8
Reputation: 1297
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.
Upvotes: 0
Reputation: 6000
1) Uninstall Entity Framework from All projects
2) Restart Visual Studio
3) Reinstalling Entity Framework to all required projects
and it started working
Upvotes: 7