Reputation: 70
I want to use different version of Entity Framework in the same project.? I have two appication: -one with EF5 -and the second with EF6 and reference to first project(those one with ef5)
Now i want to use methods from the first one in the second one. But....
i have problems, with this ,cause when i run method from ef5 app, it says that :
Could not load file or assembly 'EntityFramework, Version = 5.0.0.0, Culture = neutral, PublicKeyToken = b77a5c561934e089' or one of its dependencies. Located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
How to use different version of EF dll in the same project?
suggesions?Thanx.
Upvotes: 1
Views: 3300
Reputation: 364369
You cannot load multiple versions of the same assembly into single Application domain. .NET Framework does not support it. You must either use:
Normally there is also option for binding redirects but I'm afraid it will not work in this case because EF6 brings too many breaking changes.
Upvotes: 4