1

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:

Entity Framework install error via NuGet

What can be causing this? I'm confused.

3
  • May be you already have EntityFramework 5 or 6 installed Commented Oct 10, 2013 at 14:54
  • 1
    You have to remove EF6 first. The easiest way to do this is with the package manager. The MVC 4 project template added it as a Nuget package. Commented Oct 10, 2013 at 22:09
  • Thanks Gert, can you reply so that I mark yours as answer. NuGet was attempting to install in the project that was already referencing the latest EF dll Commented Oct 11, 2013 at 13:26

3 Answers 3

4

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...

Sign up to request clarification or add additional context in comments.

Comments

1

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

Comments

0

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.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.