私は数週間前にプロジェクトに取り掛かり、パッケージマネージャーコンソールを開き、コマンドInstall-Package Google.Apis.Drive.v3
を実行しました。すべてがうまくいっていて、何の問題もありませんでした...しかし、今私はそれをやろうとすると、このパッケージがFramework 4.0をサポートしていないことを私に知らせるエラーが出ます!Nugetパッケージをインストールするフレームワーク4.0のGoogle.Apis.Drive.v3
PM> Install-Package Google.Apis.Drive.v3
Attempting to resolve dependency 'Google.Apis (≥ 1.11.1)'.
Attempting to resolve dependency 'Google.Apis.Core (≥ 1.11.1)'.
Attempting to resolve dependency 'Microsoft.Bcl (≥ 1.1.10)'.
Attempting to resolve dependency 'Microsoft.Bcl.Build (≥ 1.0.14)'.
Attempting to resolve dependency 'Microsoft.Bcl.Async (≥ 1.0.168)'.
Attempting to resolve dependency 'Microsoft.Net.Http (≥ 2.2.29)'.
Attempting to resolve dependency 'Newtonsoft.Json (≥ 7.0.1)'.
Attempting to resolve dependency 'Zlib.Portable.Signed (≥ 1.11.0)'.
Attempting to resolve dependency 'Google.Apis.Auth (≥ 1.11.1)'.
Installing 'Microsoft.Net.Http 2.2.29'.
You are downloading Microsoft.Net.Http from Microsoft, the license agreement to which is available at http://go.microsoft.com/fwlink/?LinkId=329770. 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 'Microsoft.Net.Http 2.2.29'.
Installing 'Newtonsoft.Json 7.0.1'.
Successfully installed 'Newtonsoft.Json 7.0.1'.
Installing 'Google.Apis.Core 1.11.1'.
Successfully installed 'Google.Apis.Core 1.11.1'.
Installing 'Zlib.Portable.Signed 1.11.0'.
You are downloading Zlib.Portable.Signed from AdvancedREI, onovotny, the license agreement to which is available at http://en.wikipedia.org/wiki/Zlib_License. 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 'Zlib.Portable.Signed 1.11.0'.
Installing 'Google.Apis 1.11.1'.
Successfully installed 'Google.Apis 1.11.1'.
Installing 'Google.Apis.Auth 1.11.1'.
Successfully installed 'Google.Apis.Auth 1.11.1'.
Installing 'Google.Apis.Drive.v3 1.11.1.434'.
Successfully installed 'Google.Apis.Drive.v3 1.11.1.434'.
Adding 'Microsoft.Net.Http 2.2.29' to Drilyser.
Successfully added 'Microsoft.Net.Http 2.2.29' to Drilyser.
Adding 'Newtonsoft.Json 7.0.1' to Drilyser.
Successfully added 'Newtonsoft.Json 7.0.1' to Drilyser.
Adding 'Google.Apis.Core 1.11.1' to Drilyser.
Uninstalling 'Google.Apis.Core 1.11.1'.
Successfully uninstalled 'Google.Apis.Core 1.11.1'.
Uninstalling 'Newtonsoft.Json 7.0.1'.
Successfully uninstalled 'Newtonsoft.Json 7.0.1'.
Uninstalling 'Microsoft.Net.Http 2.2.29'.
Successfully uninstalled 'Microsoft.Net.Http 2.2.29'.
Install failed. Rolling back...
Install-Package : Could not install package 'Google.Apis.Core 1.11.1'. You are trying t
o install this package into a project that targets '.NETFramework,Version=v4.0', but th
e 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:16
+ Install-Package <<<< Google.Apis.Drive.v3
+ CategoryInfo : NotSpecified: (:) [Install-Package], InvalidOperationExc
eption
+ FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.
InstallPackageCommand
私はVS2010で開発し、フレームワーク4.0を使用します。だから私の環境にインストールするには、このパッケージが必要です。彼らはおそらく、過去数週間以内にリリースされたバージョンで4.5+のみをサポートするようにパッケージを変更しましたか?どのように私はこれを回避することができます任意のアイデア?
私の目標は、GoogleドライブAPIにアクセスし、hereの例に従うことです。
完璧、ありがとう!この回答は、4.0の環境で動作させるためにインクルードしたコマンドのために受け入れられたマークを受けました。また、迅速な対応に感謝します! –