Unable to load file or Assembly 'Entityframework, Version=5.0.0.0 or one of its dependencies

Asked

Viewed 6,563 times

1

I wonder if anyone could help me with this mistake because I’m trying to enable the Migrations in a project and this error appears when giving the command enable-Migrations in the visual studio package manager console.

Error message that appears:

Exception when calling "Createinstancefrom" with "8" argument(s): "It was not possible upload file or Assembly 'Entityframework, Version=5.0.0.0, Culture=neutral, Publickeytoken=b77a5c561934e089' or one of its dependencies. The system cannot find the file specified."

  • 1

    Does it have to be EF5? It can’t be 6?

  • By chance you installed Entity Franework in the project ex: install-package Entityframework?

  • i installed EF6. I use VS 2013

  • You can edit your question and place the contents of the file Web.config, more specifically the part of <runtime>?

  • managed to solve. packege was not installed. thanks for the help!

1 answer

2

As clarified by comment, the package was not installed correctly. The following command usually solves the problem:

Install-Package EntityFramework

It is also important to check for the correct redirection of Assembly in the archive Web.config, tag <runtime>:

<dependentAssembly>
  <assemblyIdentity name="EntityFramework" publicKeyToken="b77a5c561934e089" culture="neutral" />
  <bindingRedirect oldVersion="0.0.0.0-6.1.3.0" newVersion="6.1.3.0" />
</dependentAssembly>

Browser other questions tagged

You are not signed in. Login or sign up in order to post.