Maris
Maris

Reputation: 4776

DynamicData.EFCodeFirstProvider with EF migrations issue on porting EF 4.3.1 to EF 5.0

I'm using DynamicData.EFCodeFirst version 0.5.1.0 at the begining I was using the EF version 4.3, and used Enable-Migrations in Package manager console and all was fine. But after I decided to move to EF 5.0. I have deleted all the packages of EF 4.3 and added the EF 5.0 fixed all dependencies, removed migrations folder and rebuilded the project, After I tryied to run "Enable-Migrations" command once more I get the error:

Could not load file or assembly '***\packages\EntityFramework.4.3.1\lib\net40\EntityFramework.dll' or one of its dependencies. The system cannot find the file specified.

Why does he tryes to resolve EF framework 4.3.1 if I have already referenced EF 5.0? I even got walked with search through all the Solution to make sure that there is no reference to EF 4.3.1. Is there any way to say to Migrations that he need to use EF 5.0?

Thx for any advice.

Upvotes: 0

Views: 140

Answers (1)

Chinmoymohanty85
Chinmoymohanty85

Reputation: 127

did you check your packages.config file. Its usually not part of the project structure. Make sure it says :

<package id="EntityFramework" version="5.0.0" targetFramework="net40" />

Also, try to use "update-package EntityFramework" in the Nugest Package manager console. Hopefully it'll fix things up.

Upvotes: 1

Related Questions