Question

I currently have Visual Studio 2012 installed with Entity Framework 5.0. For some reason, EF 4.4.0.0 is the only version that supports the project.

So I installed EF 4.4.0.0, however the Nuget command line is giving me the following error:

PM> Install-Package EntityFramework -Version 4.4.0.0 Install-Package : Unable to find version '4.4.0.0' of package 'EntityFramework'. At line:1 char:1 + Install-Package EntityFramework -Version 4.4.0.0 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [Install-Package], InvalidOperationException + FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.InstallPackageCommand

PM>

1
15
1/23/2013 7:42:39 PM

Accepted Answer

Due to variations in what EF can handle depending on what version of the.NET run time your project is targeting, you are experiencing versioning issues.

When installing EF 5 and aiming for.NET 4, the assembly version will be 4.4.

If you install EF 5 and are aiming for.NET 4.5, the assembly version will be 5.0.

This is so that technologies like DBGeography, for example, can only function if.NET 4.5 is available.

Simply install EF 5 as directed, and the NuGet package will detect this and provide the appropriate version.

26
1/23/2013 7:48:19 PM

Popular Answer

tl;tr If you require assembly version 4.4.0.0 for.NET 4.0, simply enter the following into the Package Manager Console:

PM> Install-Package EntityFramework -Version 5.0.0.0


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