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

entity-framework-6

Question

I created an entity model based on SQL Server Table in my project. I write get operation on button click. When I am opening the page for first time its working fine for me. but on button click I am getting the following error:

Could not load file or assembly 'EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. The system cannot find the file specified.

I tried putting

<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />

in app.config, but it doesn't resolve the issue.

1
1
2/6/2015 6:08:02 AM

Popular Answer

I found this solution which worked for me.

Basically go to Entity Framework in the references section, go to it's properties and select "Copy Local" = "True".

Credit to Respuestas/Jambor

1
7/16/2015 5:06:54 AM


Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow