Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/visual-studio/8.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# Nuget:';Google.api';已经为';定义了依赖项;Google.api.Core';_C#_Visual Studio_Winforms_Installation_Nuget - Fatal编程技术网

C# Nuget:';Google.api';已经为';定义了依赖项;Google.api.Core';

C# Nuget:';Google.api';已经为';定义了依赖项;Google.api.Core';,c#,visual-studio,winforms,installation,nuget,C#,Visual Studio,Winforms,Installation,Nuget,在尝试安装包时,我在NuGet中遇到以下错误安装包Google.api.Drive.v3-Version 1.37.0.1470。显示以下错误: Install-Package : 'Google.Apis' already has a dependency defined for 'Google.Apis.Core'. At line:1 char:17 + Install-Package <<<< Google.Apis.Drive.v3 -Version 1.37.

在尝试安装包时,我在NuGet中遇到以下错误
安装包Google.api.Drive.v3-Version 1.37.0.1470
。显示以下错误:

Install-Package : 'Google.Apis' already has a dependency defined for 'Google.Apis.Core'.
At line:1 char:17
+ Install-Package <<<< Google.Apis.Drive.v3 -Version 1.37.0.1470
   + CategoryInfo          : NotSpecified: (:) [Install-Package], InvalidOperationException
   + FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.InstallPackageCommand
我正在使用Visual Studio 2012、.net framework 4.5和NuGet package manager 2.8.6031.8.667。请帮我解决这个问题

Nuget:'Google.api'已经为'Google.api.Core'定义了依赖项

由于您的nuget版本是
2.8.6031.8.667
,因此您可以安装的
Google.api.Drive.v3
软件包的最高版本是1.25.0.862

详细原因:

Google.api.Drive.v3
具有以下依赖项列表:

Google.Apis.Drive.v3 (>= 1.37.0.1470)

                  ----Google.Apis (>= 1.37.0)

                             ----Google.Apis.Core (>= 1.37.0)

                                             ----Newtonsoft.Json (>= 10.0.2)
由于依赖项包
Newtonsoft.Json(>=10.0.2)
引入了.netstandard依赖项:

这仅由nuget2.12及更高版本支持。这就是您获取错误信息的原因,请检查类似的线程

因此,要解决此问题,请尝试安装较低版本的软件包版本
Google.api.Drive.v3
1.25.0.862。我已经用VisualStudio2012对它进行了测试,效果很好

此外,如果要安装该软件包的更高版本,则需要将Visual Studio更新为2013


希望这能有所帮助。

谢谢您的回复。此版本1.25.0.862安装完美。非常感谢。
Google.Apis.Drive.v3 (>= 1.37.0.1470)

                  ----Google.Apis (>= 1.37.0)

                             ----Google.Apis.Core (>= 1.37.0)

                                             ----Newtonsoft.Json (>= 10.0.2)