Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Could not locate assembly "EntityFramework"

I've been working on this MVC 3 application on my home computer for a while now. I'm out of town on a different computer, so I got the project from my source control. This new computer didn't have MVC 3 yet, so I installed it after I copied the project to the new computer.

A lot of my dlls (like MvcContrib.dll) were missing since I didn't set Copy Local to true when I first created the project on my home computer. So I've been going in and downloading all the missing dlls and adding them to my project.

The only one I can't find is EntityFramework.dll. I can't find a download for it, and I don't see it as a .NET dll when I try to add a reference.

enter image description here

I'm getting this warning when I try to build: Could not resolve this reference. Could not locate the assembly "EntityFramework"

like image 670
Steven Avatar asked Jun 27 '11 20:06

Steven


2 Answers

Download and install Framework 4.0 and it's included.

http://www.microsoft.com/download/en/details.aspx?id=17851

like image 44
ChrisBint Avatar answered Sep 29 '22 21:09

ChrisBint


This can also happen when you manually remove the EntityFramework reference in a project.

If you've lost the reference you can remove the entry in packages.config for EntityFramework

<packages>
    <package id="EntityFramework" version="5.0.0" targetFramework="net40" />
</packages>

After removal you are able to re-install the package through the Package Manager (Manage NuGet Packages)

like image 93
Mark Avatar answered Sep 29 '22 22:09

Mark