1
votes

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=1.0.0.0, uses 'EntityFramework, Version=5.0.0.0, which has a higher version than referenced assembly 'EntityFramework, Version=4.4.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' e:\New folder\EntityFramModel\bin\Debug\EntityFramModel.dll Tanya_Marinova_FN_0801262079_reservation_system

3
update your previous question before starting a new one.Jehof

3 Answers

3
votes

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.

0
votes

I had the same problem and I found required library (EntityFramework) in my solution, because there is more then one nested project.

So, check the path and add the reference by browse reference option: SOLUTIONPATH\packages\EntityFramework.6.1.3\lib\net45\EntityFramework.dll

0
votes

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