Search code examples
wcfentity-frameworkentity-framework-4entity-framework-4.1wcf-data-services

Could not load file or assembly 'EntityFramework, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies


I am getting this error in a WCF web service when the program attempts to use a method that employs the entity framework. However, we know that the server has the entity framework (correct version) installed because it is hosting another WCF web service and an intranet site that use it successfully.

I've tried to set copy local to true, however this simply compiles the Entity Framework dll into the debug/release folder of the project that uses it, not the web service project that gets deployed (the project that gets deployed contains a references the project that uses the entity framework).

Has anyone run into this kind of issue before and know a work-around either with or without using copy local?


Solution

  • The solution to this problem was to simply place the EntityFramework.dll and .xml file generated in the bin of the project that uses the Entity Framework and place that in the bin of the service project that was being deployed.