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?
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
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.
Just Adding System.Data.Entity might not enough;
because by this you are trying to referencing something that has not been installed yet.
this issue can be resolved by installing EntityFramework.
So to do this :
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With