C# – This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded in Entity Framework

asp.netcentity-framework

I am new to Entity Framework. I have installed .net framework 3.5 with sp 1. I am using vs 2008.

But, I am getting this below error:

Error 1 Could not load file or assembly 'EntityFramework' or one of its dependencies.
This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.

Best Answer

Probably you are using EF4.x or EF 5.x. The first version targets .Net 4.0 and the second one targets .Net 4.5. If you need to use .Net 3.5 you should use an early version of the EF library.