I get the following Metadata Exception from Entity Framework when running query:
Schema specified is not valid. Errors:
error 0194: All artifacts loaded into an ItemCollection must have the same version. Multiple versions were encountered.
Oracle.DataAccess.src.EntityFramework.Resources.EFOracleStoreSchemaDefinition.ssdl(2,28) : error 0172: All SSDL artifacts must target the same provider. The Provider 'System.Data.SqlClient' is different from 'System.Data.SqlClient' that was encountered earlier.
Oracle.DataAccess.src.EntityFramework.Resources.EFOracleStoreSchemaDefinition.ssdl(2,64) : error 0169: All SSDL artifacts must target the same provider. The ProviderManifestToken '9.2' is different from '2012' that was encountered earlier.
This is my Entity Connection String
"metadata=res://*;provider=System.Data.SqlClient;provider connection string=\"SERVER=SERVER;DATABASE=DB;Trusted_Connection=True;\""
(It is derived from a normal connection string using this method:
private static string GetEntityConnectionString(string connectionString)
{
var sbEntity = new EntityConnectionStringBuilder();
sbEntity.Provider = "System.Data.SqlClient";
sbEntity.ProviderConnectionString = connectionString;
sbEntity.Metadata = "res://*";
return sbEntity.ToString();
}
I pass it a standard connection string: "SERVER=SERVER;DATABASE=DB;Trusted_Connection=True;"
Very strange that it thinks it's somehow Oracle related. How do I fix this?