I am trying to deploy EF 5.0 app on a server which has only .NET 4.0 installed.
My project builds and runs successfully on local because I have .NET 4.5 along with .NET 4.0
However on server I have only .NET 4.0 installled,
when I deploy my app I get following error:
Method not found: 'Void System.Data.Objects.ObjectContextOptions.set_UseConsistentNullReferenceBehavior(Boolean)'.
When I checked references of EF I see that it is referring to the EntityFramework.5.0.0\lib\net45\EntityFramework.dll
instead the .net 4.0 version,
When I add reference to the EntityFramework.5.0.0\lib\net40\EntityFramework.dll
I get following runtime error:
Could not load file or assembly 'EntityFramework' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference.
Help
REF: Entity Framework 5.0 - minimum .Net Framework version required ? .Net 4.0 or 4.5?