Can't add a reference to EntityFramework in my unit test project

entity-framework visual-studio

Question

I have a new project happily using Entity Framework 5. After I added the edmx to the solution, it added a reference to EntityFramework version 5.

I created a unit test project, and I need to use something from the EntityFramework library. However, there is no reference to EntityFramework. When I go to Add Reference, I cannot find it anywhere in the list.

I've checked and my unit test is referencing .NET 4.5. Any idea why I can't add the reference?

1
7
5/6/2013 3:17:05 PM

Accepted Answer

Remove all the entries you have made to the web.config file. Just Right Click on your project name in the solution, Click on Manage Nuget Packages On your left hand Click on Online and on the right hand just put Entity Framework in the search box. Click on Install

this will do all the things automatically for you.

Answer is taken from: EntityFramework 5 Install fails in VS 2012

18
5/23/2017 11:46:45 AM

Popular Answer

I had the same problem with a new application. I opened the Package Manager Console and used install-package EntityFramework, which installed version 6 without issue.



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