Reputation: 23
I'm facing the following error in NuGet while trying to install package Install-Package Google.Apis.Drive.v3 -Version 1.37.0.1470
. Showing following Error:
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
if i install previous version Install-Package Google.Apis.Drive.v2
. Also showing same Error:
Install-Package : 'Google.Apis' already has a dependency defined for 'Google.Apis.Core'.
At line:1 char:17
+ Install-Package <<<< Google.Apis.Drive.v2
+ CategoryInfo : NotSpecified: (:) [Install-Package], InvalidOperationException
+ FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.InstallPackageCommand
I'm using Visual Studio 2012, .net framework 4.5 and NuGet package manager 2.8.6031.8.667. Please help me how to solve it.
Upvotes: 2
Views: 3433
Reputation: 76740
Nuget: 'Google.Apis' already has a dependency defined for 'Google.Apis.Core'
Since your nuget version is 2.8.6031.8.667
, the highest version of the package you can install Google.Apis.Drive.v3
is 1.25.0.862.
Detailed Reason:
The package Google.Apis.Drive.v3
have following dependencies list:
Google.Apis.Drive.v3 (>= 1.37.0.1470)
----Google.Apis (>= 1.37.0)
----Google.Apis.Core (>= 1.37.0)
----Newtonsoft.Json (>= 10.0.2)
Since the dependency package Newtonsoft.Json (>= 10.0.2)
introduces the .netstandard dependencies:
This is only supported by the nuget 2.12 and above. That the reason why you got that error info, check the similar thread here.
So, to resolve this issue, please try to install the a lower version of package version Google.Apis.Drive.v3
1.25.0.862. I have test it with Visual Studio 2012 on my side, and it works fine.
Besides, if you want to install a later version of that package, you need to update you Visual Studio to 2013.
Hope this helps.
Upvotes: 3