首页 > 代码库 > The EntityFramework package is not installed on project

The EntityFramework package is not installed on project

VS2015 使用EF的code first 报错

Get-Package : 找不到与参数名称“ProjectName”匹配的参数。
所在位置 packages\EntityFramework.6.1.3\tools\EntityFramework.psm1:611 字符: 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

解决方案:

将nuget升级到最高版本,如果nuget无法升级,卸载后重新安装就可以了。

 

The EntityFramework package is not installed on project