The EntityFramework package is not installed on project

asp.net-mvc entity-framework nuget-package visual-studio

Question

My really simple project named "Match" is having difficulties installing the EF (just now learning MVC, better late than never). The overall situation is that I originally developed the Model class with only 2 fields and that I now want to add a few additional fields and attributes to it. I changed the Model class, and right now I'm attempting to update the DB to reflect that change. To achieve so, I'm attempting to utilize EF's Update-Database command.

PM> install-package EntityFramework You are downloading EntityFramework from Microsoft, the license agreement to which is available at http://go.microsoft.com/fwlink/?LinkId=253898&clcid=0x409. Check the package for additional dependencies, which may come with their own license agreement(s). Your use of the package and dependencies constitutes your acceptance of their license agreements. If you do not accept the license agreement(s), then delete the relevant components from your device. Successfully installed 'EntityFramework 5.0.0'. Successfully added 'EntityFramework 5.0.0' to Match.

Type 'get-help EntityFramework' to see all available Entity Framework commands.

PM> Enable-Migrations Get-Package : A parameter cannot be found that matches parameter name 'ProjectName'. At C:\Users\Dave\Documents\Visual Studio 2010\Projects\Match\packages\EntityFramework.5.0.0\tools\EntityFramework.psm1:611 char:40 + $package = Get-Package -ProjectName <<<< $project.FullName | ?{ $_.Id -eq 'EntityFramework' } + CategoryInfo : InvalidArgument: (:) [Get-Package], ParameterBindingException + FullyQualifiedErrorId : NamedParameterNotFound,NuGet.PowerShell.Commands.GetPackageCommand

The EntityFramework package is not installed on project 'Match'.

1
56
4/4/2016 10:04:19 AM

Accepted Answer

Just switch to NuGet 2.x. It's needed for EF 5.0.

21
8/24/2012 4:56:30 AM

Popular Answer

I hope no one is as dim-witted as I am, but in case they are:

There is a dropdown menu for "Default Project" in the Package Manager Console, which might be the cause of this problem. If this isn't configured properly, you'll receive On project "x," the EntityFramework package is not present. Reset everything by changing the dropdown to your EF project.



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