Search code examples
visual-studio-2010entity-framework.net-3.5.net-4.0compatibility

Using Entity Framework 3.5 AND 4.0 in the Same Project


I'm wondering if using VS.Net 2010, I can have Entity Framework 3.5 code running along side 4.0 code. I have a project that I'm working on, some of it is currently written using EF 3.5. I'd like to start using EF 4.0 for anything new we add to the project, and convert the EF 3.5 stuff over a little at a time. Is it feasible to run the two side by side in the same project?

Thanks in advance.


Solution

  • Convert assembly with your EF code from .NET 3.5 to .NET 4.0 (EFv1 to EFv4 - should be automatic) and start to add new features - that is the only feasible way to do it. As mentioned in other answer you can't run two .NET versions in single project. Using EFv1 and EFv4 side by side will require second project with separate EDMX etc. Merging these projects later will add additional work and more complexity than converting your current version.