安装多个NuGet包错误

时间:2017-12-06 16:09:58

标签: c# visual-studio nuget nuget-package

我有这个问题。我想下载" Install-Package Microsoft.ProjectOxford.Face -Version 1.3.0"但我接受了这个错误。我搜索了但我找不到。

Install-Package : Could not install package 'Microsoft.ProjectOxford.Common 1.0.324'. You are trying to install this package into a p
roject that targets '.NETFramework,Version=v4.0', but the package does not contain any assembly references or content files that are 
compatible with that framework. For more information, contact the package author.
At line:1 char:1
+ Install-Package Microsoft.ProjectOxford.Face -Version 1.3.0
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Install-Package], Exception
    + FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand

1 个答案:

答案 0 :(得分:0)

  

安装多个NuGet包错误

首先要指出的是,magicandre评论指出了正确的方向,“将您的项目升级到4.5 ”。

详细信息:

搜索nuget.org上的nuget包Microsoft.ProjectOxford.Face,我们注意到此包有两个依赖关系:Microsoft.ProjectOxford.Common (>= 1.0.324)Newtonsoft.Json (>= 9.0.1)

enter image description here

然后从nuget.org手动下载依赖包Microsoft.ProjectOxford.Common (>= 1.0.324),将其重命名为.zip的末尾,然后解压缩。您会注意到该程序包的目标是 .NET Standdard 1.1

然后根据compatibility list of .NET Standard

enter image description here

因此要安装软件包Microsoft.ProjectOxford.Face,您应该将项目升级到.NET framwork 4.5