【发布时间】:2018-02-13 09:55:44
【问题描述】:
在我的 Xamarin.forms 便携式项目中,我正在尝试从 google sheet 读取信息:
using (var stream = this.Assets.Open(@"clientsecret.json"))
{
var secrets = GoogleClientSecrets.Load(stream).Secrets;
//I get the secrets correctly
credential = GoogleWebAuthorizationBroker.AuthorizeAsync(
secrets,
Scopes,
"user",
CancellationToken.None,
new FileDataStore(credPath,true)).Result;
}
我明白了
未处理的异常
System.AggregateException:发生一个或多个错误。
当编译器试图获取凭证时,请记住相同的代码在 Windows 窗体应用程序中运行良好
【问题讨论】:
-
我找到了一个很好的解决方案来阅读谷歌表格。检查以下链接stackoverflow.com/questions/48432846/…
标签: c# xamarin.forms google-api google-sheets-api google-api-dotnet-client