Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Could not determine storage version - Entity Framework

I'm implementing code first pattern in a separate project in my current solution. Since I did this and I initialize my connection string in DbContext I get this weird error:

Could not determine storage version; a valid storage connection or a version hint is required.

I'm using Entity Framework 5.0.0.0 and the rest of my solutions projects work great as they use EDMX files for database access yet only my code first project throws this exception. What is it and why?

like image 931
Rovdjuret Avatar asked Dec 29 '14 10:12

Rovdjuret


4 Answers

Install EFTools6.1.3ForVS2012, mine got solved

like image 29
Thiru Avatar answered Sep 17 '22 17:09

Thiru


Solved the same issue with:

Go to Solution Explorer

  1. Right click on "xxx.edmx" file
  2. Select "Open with" >> Editor XML Editor
  3. Change ProviderManifestToken="XXXX" with 2008
like image 71
Sithu Avatar answered Sep 19 '22 17:09

Sithu


It seems problem got solved when I upgraded Entity Framework for every project using it to Entity Framework 6.1.2.

Works like a charm!

like image 35
Rovdjuret Avatar answered Sep 19 '22 17:09

Rovdjuret


Drop EF table __MigrationHistory, assuming you were just playing with migrations in test.

like image 20
Gary Boone Avatar answered Sep 19 '22 17:09

Gary Boone