我有一个使用便携式库的Xamarin Forms项目。通过NuGet,我有我的便携式库和我的Win 8.1项目更新了v1.25.0 for Google.Apis.Auth。
当我运行Win 8.1项目时,出现以下错误。
类型' System.MissingMethodException'的例外情况发生在mscorlib.dll中但未在用户代码中处理
其他信息:未找到方法:&#39; System.Threading.Tasks.Task 1<Google.Apis.Auth.OAuth2.UserCredential> Google.Apis.Auth.OAuth2.GoogleWebAuthorizationBroker.AuthorizeAsync(Google.Apis.Auth.OAuth2.ClientSecrets, System.Collections.Generic.IEnumerable
1,System.String,System.Threading.CancellationToken,Google.Apis.Util.Store.IDataStore,Google。 Apis.Auth.OAuth2.ICodeReceiver)&#39;
项目似乎引用了具有Authorize方法的不同签名的程序集。便携式项目有可选的参数,我没有指定值。但Win 8.1项目的该方法版本没有可选的参数。
我对此很新,所以我不熟悉如何解决这个问题。任何帮助将不胜感激。
credential = await GoogleWebAuthorizationBroker.AuthorizeAsync(
GoogleClientSecrets.Load(stream).Secrets,
Scopes,
"user",
CancellationToken.None);