16

I tried to install EntityFramework 4.1 on VS 2010 through NuGet. I searched and found the package through "Tools > Library Package Manager > Add Library Package Reference" tool and I got this error: "This package (or one of its dependencies) contains powershell scripts and needs to be installed from the package manager console.". This is what I did to fix it:

Tools > Library Package Manager > Package Manager Console
PM > get-package -remote -filter entityframework
(got some results including EntityFramework 4.1.10311.0)
PM > install-package -id EntityFramework
Successfully added 'EntityFramework ...

The question is:
1. What was wrong with "Add Library Package Reference" option? In this MS tutorial http://www.asp.net/mvc/tutorials/getting-started-with-mvc3-part4-cs it seems that it should work fine.
2. Is there a better solution?

Thanks to all.

2
  • For more on Package Manager Console commands check nuget.codeplex.com/… Commented Mar 18, 2011 at 13:45
  • 1
    Thanks for posting how to do this. Commented Apr 6, 2011 at 20:20

1 Answer 1

13

What version of NuGet are you using? Update to the latest in the VS Gallery. More info on how to upgrade here: http://www.hanselman.com/blog/NuGetActionPlanUpgradeTo11SetupAutomaticUpdatesGetNuGetPackageExplorer.aspx

In 1.1 we allows packages with install.ps1/uninstall.ps1 to be installed from the dialog, this wasn't the case before.

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

2 Comments

+1. This fixed it for me. I had to removed NuGet1.0, and then install 1.1 from nuget.org rather than through VS for some reason. But with nuGet 1.1, EntityFramework installed via NuGet with no problems.
Yes, it works. Just Installed, without uninstall, and fixed. Tks.

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.