Reputation: 15237
I am in a new ASP.NET MVC 4 project and I want to make use of Entity Framework v5.
So I opened up my package installer console in Visual Studio 2013 RC and I typed in the following:
Install-Package EntityFramework -Version 5.0.0
But I get an error! Here is what I get:
What can be causing this? I'm confused.
Upvotes: 1
Views: 9303
Reputation: 11
Open the VS 2013 Go to TOOLS=>NuGet Package Manager=>Package Manage Console. Copy and paste the below code and enter PM>Install-Package EntityFramework
Upvotes: 1
Reputation: 109099
The message says that you can't upgrade EF6 to EF5. This tells you that EF6 is already installed. The only way to downgrade to EF5 is to remove EF6 first and then install the EF5 NuGet package.
The easiest way to remove a Nuget package is through the Visual Studio menu, Tools > Library Package Manager > Manage NuGet Packages for Solution...
Upvotes: 4
Reputation: 571
Right click the project you want to install EF v5 in, and click on Manage NuGet Packages. Search for "Entity Framework" and select it to install it. This simply another way to install NuGet packages but it could possibly work as opposed to typing it into the console.
Also, if this doesn't help, try it again after launching Visual Studio in Administrator mode.
Upvotes: 0