Wednesday, January 8, 2014

Installing Entity Framework v. 5.0

As many developers already know, Entity Framework v. 6.0 has already been released.  Therefore, when you open the NuGet Package Manager from within Visual Studio, you will only be presented with the option to install the latest and greatest version of Entity Framework.

Well, unfortunately, Entity Framework 6 has some specific requirements for versions of the .NET Framework, versions of ASP.NET MVC etc. which may not be practical for all current web applications.

Therefore, what if you want to install an older version of the Entity Framework, such as version 5.0??  Well, unfortunately, this cannot be managed through the NuGet User Interface, but it can be handled through the NuGet Package Manager Console as described in this article:

You simply have to type the following command in the NuGet Package Manager Console (which can be accessed from the Tools --> Library Package Manager --> Package Manager Console menu item in Visual Studio).

Install-Package EntityFramework -Version 5.0.0

That is all!  NuGet will then install the appropriate version of Entity Framework for you (v. 5.0).

No comments:

Post a Comment