Upgrade to EF6 on .net4 - System.Data.MetadataException: Schema specified is not valid

You created an EDMX file with Entity Framework 6 but you using it with Entity Framework 5. Entity Framework 6 uses EDMX file with version 3.0 but Entity Framework 5 does not support it.

You must repair your EDMX file from version 3.0 to version 2.0

The easiest way to do that is open EDMX in Visual Studio 2012 project with Entity Framework 5 or older. The entity data model designer show error: unable to display file. The file references an XML namespace that is inconsistent with the target framework of the project. Than click the modify link and the designer automaticly repair your EDMX file.

OR:
1. open your EDMX file as XML Editor
2. change the following elements:

from:
<edmx:Edmx Version="3.0" xmlns:edmx="http://schemas.microsoft.com/ado/2009/11/edmx">
to:
<edmx:Edmx Version="2.0" xmlns:edmx="http://schemas.microsoft.com/ado/2008/10/edmx">

from:
xmlns="http://schemas.microsoft.com/ado/2009/11/edm/ssdl"
to:
xmlns="http://schemas.microsoft.com/ado/2009/02/edm/ssdl"

from:
xmlns="http://schemas.microsoft.com/ado/2009/11/edm"
to:
xmlns="http://schemas.microsoft.com/ado/2008/09/edm"

from:
<Mapping Space="C-S" xmlns="http://schemas.microsoft.com/ado/2009/11/mapping/cs">
to:
<Mapping Space="C-S" xmlns="http://schemas.microsoft.com/ado/2008/09/mapping/cs">

... for all inconsistent xmlns