Assembly 'EntityFramModel' uses EntityFramework 5.0 which has a higher version thhan the referenced assembly entity-framework


Hello In my solution I've' got a class library named 'EntityFrameworkModel' AND here i add ADO.NET ENTITY DATA MODEL. So my .edmx model perfectly created.

In my other project in this solution - which is asp,net project, in my web form here is what I do

1.I add the reference to my class library with the .edmx model

2.I add the

using EntityFramModel  

3. I make one really simple function which I call in Page_Load

public void LoadTourists()

    var db = new excursionEntities();

    foreach (var tourist in db.Tourists)
        lblproba.Text += tourist.Name_kir.ToString();  

And I keep getting the error:

Assembly 'EntityFramModel, Version=, uses 'EntityFramework, Version=, which has a higher version than referenced assembly 'EntityFramework, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089' e:\New folder\EntityFramModel\bin\Debug\EntityFramModel.dll Tanya_Marinova_FN_0801262079_reservation_system

9/23/2013 11:31:28 AM

Accepted Answer

Since you use your edmx in your webproject you need to reference the same Entity Framework dll in the web project as you have in your library. Your error suggests, that you use a different version of the entity dll.

9/23/2013 11:29:08 AM

Popular Answer

For anyone who is still having this issue with Entity Framework:

Go to the specific project in a solution

Under references, delete existing reference to Entity Framework

Right-click on the project and click manage nudget package

Add a matching reference (or latest) to Entity framework

Hope this helps

Related Questions


Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow