使用Google drive apis创建上传文件的应用程序。 [英] Create application for upload file using Google drive apis.

查看:66
本文介绍了使用Google drive apis创建上传文件的应用程序。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尝试这样做却无法成功。

我使用管理Nuget并导入Google.Apis.Drive.v2以及许多其他名称空间但我收到错误是Google之间的模糊参考.Apis.Drive.v2.Data.File。



我的尝试:



我使用管理Nuget并导入Google.Apis.Drive.v2和许多其他名称空间但我收到错误是'Google.Apis.Drive.v2.Data.File'之间的模糊引用。div class =h2_lin>解决方案

Google.Apis.Drive.v2.Data和System.IO都定义了File类,我的意思是

两个命名空间(Google.Apis。 Drive.v2.Data和System.IO)定义了类File,并且可能有两个名称空间包含在using语句中。您需要使用完全限定名称,例如以下代码段

 使用 GoogleDataAPI = Google.Apis.Drive。 v2.Data; 
使用 SystemFile = System.IO.File



它将解决问题


Try to do it but could not successful.
I use manage Nuget and import Google.Apis.Drive.v2 and many other name space but I get error "is an ambiguous reference between 'Google.Apis.Drive.v2.Data.File".

What I have tried:

I use manage Nuget and import Google.Apis.Drive.v2 and many other name space but I get error "is an ambiguous reference between 'Google.Apis.Drive.v2.Data.File".

解决方案

Google.Apis.Drive.v2.Data and System.IO both define File class, I mean
Both namespaces (Google.Apis.Drive.v2.Data and System.IO) defines class File and, probably, you have both namespaces "included" with using statement. you need to use fully qualified name, like below snippet

using GoogleDataAPI = Google.Apis.Drive.v2.Data;
using SystemFile =  System.IO.File


it will resolve the things


这篇关于使用Google drive apis创建上传文件的应用程序。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆