我尝试按照这里的说明进行操作:
https://code.google.com/p/google-api-dotnet-client/wiki/Build
但是当我尝试按照“使用NuGet”的说明操作时,我失败了! 我收到了以下回复:
Attempting to resolve dependency 'Newtonsoft.Json (≥ 5.0.5)'.
Attempting to resolve dependency 'Microsoft.Bcl (≥ 1.0.19)'.
Attempting to resolve dependency 'Microsoft.Bcl.Build (≥ 1.0.4)'.
Attempting to resolve dependency 'Microsoft.Bcl.Async (≥ 1.0.16)'.
Attempting to resolve dependency 'Microsoft.Net.Http (≥ 2.1.10)'.
Attempting to resolve dependency 'Zlib.Portable (≥ 1.9.2)'.
Attempting to resolve dependency 'log4net (≥ 2.0.0)'.
Successfully installed 'Newtonsoft.Json 5.0.6'.
Successfully installed 'Microsoft.Bcl.Build 1.0.7'.
Successfully installed 'Microsoft.Bcl 1.0.19'.
Successfully installed 'Microsoft.Bcl.Async 1.0.16'.
Successfully installed 'Microsoft.Net.Http 2.1.10'.
Successfully installed 'Zlib.Portable 1.9.2'.
Successfully installed 'log4net 2.0.0'.
Successfully installed 'Google.Apis 1.4.0-beta'.
Successfully added 'Newtonsoft.Json 5.0.6' to JoBeGAPPSAdm.
Successfully added 'Microsoft.Bcl.Build 1.0.7' to JoBeGAPPSAdm.
Executing script file 'C:\Users\Swejope\documents\visual studio 2012\Projects\JoBeGAPPSAdm\packages\Microsoft.Bcl.Build.1.0.7\tools\Install.ps1'.
Successfully added 'Microsoft.Bcl 1.0.19' to JoBeGAPPSAdm.
Successfully added 'Microsoft.Bcl.Async 1.0.16' to JoBeGAPPSAdm.
Successfully added 'Microsoft.Net.Http 2.1.10' to JoBeGAPPSAdm.
Executing script file 'C:\Users\Swejope\documents\visual studio 2012\Projects\JoBeGAPPSAdm\packages\Microsoft.Bcl.Build.1.0.7\tools\Uninstall.ps1'.
Successfully uninstalled 'Zlib.Portable 1.9.2'.
Successfully uninstalled 'Microsoft.Net.Http 2.1.10'.
Successfully uninstalled 'Microsoft.Bcl.Async 1.0.16'.
Successfully uninstalled 'Microsoft.Bcl 1.0.19'.
Access to the path 'C:\Users\Swejope\documents\visual studio 2012\Projects\JoBeGAPPSAdm\packages\Microsoft.Bcl.Build.1.0.7\tools\Microsoft.Bcl.Build.Tasks.dll' is denied.
Katalogen är inte tom.
Successfully uninstalled 'Microsoft.Bcl.Build 1.0.7'.
Successfully uninstalled 'Newtonsoft.Json 5.0.6'.
Install failed. Rolling back...
Access to the path 'C:\Users\Swejope\documents\visual studi 2012\Projects\JoBeGAPPSAdm\packages\Microsoft.Bcl.Build.1.0.7\tools\Microsoft.Bcl.Build.Tasks.dll' is denied.
Katalogen är inte tom.
Could not install package 'Zlib.Portable 1.9.2'. You are trying to install this package into a project that targets '.NETFramework,Version=v4.0', but the package does not contain any assembly references that are compatible with that framework. For more information, contact the package author.
我已经尝试过使用.NET Framework 4.5,但是得到了相同的响应。
编辑:我已经解决了这个问题!
在Visual Studio Express 2012中更新NuGet即可解决此问题。