This project is read-only.

Cannot add the EFCodeFirst package

Apr 4, 2011 at 11:18 AM

I am following this tutorial on Windows XP. VS 2010 and tutorial guide were downloaded just today so I assume I'm getting the latest versions.

All went swimmingly until Part 4

Use NuGet to install EFCodeFirst

When I tried to add the library package reference an error message popped up, which I failed to record. Then I tried the Package manager console and got a message that I needed to install PowerShell.

I did that as instructed and tried again to add the library package reference. This time the dialog box appeared as shown. I searched for EfCodeFirst and its description states that this is legacy code and is now a part of EntityFramework. I tried to install (1) EfCodeFirst and then (2) EntityFramework. Both times I got a message that the package contains PowerShell scripts and I have to use the Package Manager Console to install the package.

So please:

(1) State that PowerShell is a pre-requisite for running the tutorial.

(2) Give us a PowerShell script to do the install.

Apr 4, 2011 at 1:35 PM

The solution turned out to be surprisingly easy.

Instead of the method described in the tutorial do as follows:

Install Powershell for your OS, if not already done.

In the solution, click on Tools/Library package Manager/Package Manager Console

After the PM> prompt type

Install-Package EfCodeFirst

The package gets installed, reading the log file shows that EfCodeFirst is obsolete and EntityFramework was installed instead.

Close the console window.

Look at Reference in the Solution Explorer, you should see EntityFramework there.

Apr 4, 2011 at 7:05 PM

@dhenry - Yes, the EFCodeFirst package was replaced by the EntityFramework package. I'm including that change in the next update, changing and will change this to a work item to track it. Thanks for posting the solution so other people can benefit.

Apr 4, 2011 at 7:06 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.