In my current Project i have two Project References that are DataContexts. One is for accessing an Oracle Db and is using EF 4.2. The other is accessing a SQL Server and uses EF 6.0.
I already read this solution, but i can't get it to work.
Here is what i got:
- I referenced EF 6.0.
- In a Pre-build command i xcopied both dlls in seperate folders
In my Appconfig i added this:
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="EntityFramework" publicKeyToken="b77a5c561934e089" />
<codeBase version="6.0.0.0" href="ef6.0\EntityFramework.dll" />
<codeBase version="4.2.0.0" href="ef4.2\EntityFramework.dll" />
</dependentAssembly>
</assemblyBinding>
</runtime>
I am still getting: The type 'System.Data.Objects.ObjectContext' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Data.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.
Any hints?