Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Reference to assembly error

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?

like image 506
mr. Holiday Avatar asked Jan 17 '14 14:01

mr. Holiday


People also ask

What is an assembly reference?

Reference assemblies are usually distributed with the Software Development Kit (SDK) of a particular platform or library. Using a reference assembly enables developers to build programs that target a specific library version without having the full implementation assembly for that version.


2 Answers

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
like image 129
Inayat Ali Jan Avatar answered Sep 18 '22 18:09

Inayat Ali Jan


1) Uninstall Entity Framework from All projects

2) Restart Visual Studio

3) Reinstalling Entity Framework to all required projects

and it started working

like image 35
Moji Avatar answered Sep 19 '22 18:09

Moji