【发布时间】:2013-12-01 12:51:46
【问题描述】:
我正在使用 Visual Studio 2012 (C#) 中 google drive 的代码。我花了几个小时摆弄 nuget 参考必要的库。
我编译了测试应用程序并收到以下警告:
'Google.Apis.Authentication.OAuth2.DotNetOpenAuth.NativeApplicationClient' is obsolete: 'NativeApplicationClient is not supported any more and it's going to be removed in 1.7.0-beta. Consider using the new Google.Apis.Auth NuGet package which supports .NET 4, .NET for WindowsStore apps, Windows Phone 7.5 and 8 and Portable Class Libraries as well'
'Google.Apis.Authentication.OAuth2.GoogleAuthenticationServer' is obsolete: 'GoogleAuthenticationServer is not supported any more and it's going to be removed in 1.7.0-beta. Consider using the new Google.Apis.Auth NuGet package which supports .NET 4, .NET for Windows Store apps, Windows Phone 7.5 and 8 and Portable Class Libraries as well'
'Google.Apis.Drive.v2.DriveService.Scopes' is obsolete: 'Use DriveService.Scope instead. This enum is going to be removed in version 1.7.0-beta.'
除了添加client_ID和client_secret之外,我没有修改代码。除此之外,它似乎在运行......
我还会提到我正在使用 nuget Google.Apis.Auth 包。
DriveService.Scopes 警告背后的代码使用的是 DriveService.Scopes 而不是 Google.Apis.DriveService.Scopes(查看链接上的代码;我的也是一样)。
随着 google admin api 被弃用,google 似乎几乎每隔一周就打破旧 api,我急于使用新的 API。但是,根据我在这里看到的情况,我想知道这是否是个好主意。我可以用煎锅换取火。话虽如此,如果您当前的示例已经过时,我们应该使用什么?
【问题讨论】:
标签: google-api google-drive-api google-oauth google-api-dotnet-client