2013-08-26 81 views
1

我试图用它的API连接到Google Drive。 Google声明它提供了必要的DLL和引用at this link here(“下载最新版本的库”)。但是,当我尝试添加必要的参考时,C#无法找到任何DLL,并且手动搜索它们会得到0个结果。从参考链接:C#Google Drive API参考

ZIP文件包含核心库和驱动器特定的DLL。 在下一个 部分讨论在您的解决方案中引用这些DLL。

下面的命名空间需要引用:在谷歌链接四处寻找

using DotNetOpenAuth.OAuth2; 
using Google.Apis.Authentication.OAuth2; 
using Google.Apis.Authentication.OAuth2.DotNetOpenAuth; 
using Google.Apis.Drive.v2; 
using Google.Apis.Drive.v2.Data; 
using Google.Apis.Util; 
using Google.Apis.Services; 

,我不觉得与在上述提及的必要DLL什么事。

注意:这是一个测试桌面控制台应用程序,而不是Web应用程序。

编辑:我要补充,如果我添加了以下文件作为现有项目,但它仍然是无法发现,大部分的组件:

Google.Apis.Drive.v2.1.5.0.95-beta.nuspec 
Google.Apis.Drive.v2.cs 
Google.Apis.Drive.v2.csproj 
packages.config 

using DotNetOpenAuth.OAuth2; 
using Google.Apis.Authentication.OAuth2; 
using Google.Apis.Authentication.OAuth2.DotNetOpenAuth; 
using Google.Apis.Util; 
using Google.Apis.Services; 
+0

好了,下载文件包含源仅据我可以看到... ...你必须重新编译。 –

回答

3

您也可以下载API,它通过的NuGet的依赖.org如果你想要它们预编译。然而,Nuget版本只是略微过时,如果你想要最新版本,你将不得不下载源代码并构建它。

为了简单起见,我会说与Nuget版本一起去。

Google Drive API on Nuget.org