RonRonDK
RonRonDK

Reputation: 435

Install Entity Framework 4 in Visual Studio 2013

I am trying to install Entity Framework 4 in Visual Studio 2013 to use with an ASP.NET MVC 4 application but the Package Manager Console is unable to find it.

I would post a screenshot showing the error but I am not allowed since my rep is less than 10?. Anyway the error I am getting says:

Install-Package : Unable to find version '4.3.1' of package 'EntityFramework'.At line:1 char:1

For that matter I have tried searching for several different versions including version 6.1.3 with no luck. Am I doing anything wrong here?.

I have been Googling this issue for a couple of hours now but all I can find is these two questions that are a little different and to no help for me.

How to Use Entity Framework 4 with Visual Studio 2013

Visual Studio 2013 and Entity Framework 4

UPDATE:

Alright so today at home I first tried again to install EntityFramework (as well as many other packages) from the Packet Manager Console just like yesterday. Still no luck. Then I tried the exact same thing on my home computer which runs the exact same version of Visual Studio 2013. Here I had no problems at all. Came through at first try.

Then I got back to my work computer and tried again and this time it worked. And now I can not reproduce the problem. But why? I did nothing different on the two computers. My theory is that the infrastructure at my workplace might have blocked some necessary ports for Visual Studio to work properly. Today I was doing it while connected to my home network. But then again - it did not work the first couple of times I tried again. So this problem may be inexplainable.

Upvotes: 2

Views: 1547

Answers (2)

KarmaEDV
KarmaEDV

Reputation: 1691

Maybe you had the wrong source chosen in the console despite the correct settings. Have a look at the image, there is a dropdown where you specify the source (and overwrite the settings)

Also keep in mind, that EF4 comes from the Microsoft & .Net source and not from nuget.org, EF5 is partially on nuget.org and EF6 is all on nuget.org.

enter image description here

Upvotes: 0

Chris Schwerdt
Chris Schwerdt

Reputation: 1191

Double-check that you have either the nuget.org or "Microsoft and .NET" repository available and enabled as a package source in Visual Studio.

In Visual Studio, navigate to Tools, NuGet Package Manager, Package Manager Settings, Package Sources, and make sure at least one of those is checked. If neither is visible you'll want to add one for nuget.org (source is https://www.nuget.org/api/v2/).

Make sure your solution is open at the time you manage your package sources as NuGet.Config files on your file system can also affect your package sources.

Upvotes: 1

Related Questions