GoogleWebAuthorizationBroker not found

醉酒当歌 提交于 2019-12-03 16:14:36

If you are building a "portable class library" project, like I was, you may need to manually add a reference to

Google.Apis.Auth.PlatformServices

I don't know why it is left out when adding google apis to a "Portable Class Library", but that's what solved it for me.

Use these:

in package manager.

pm> install-package google.apis -pre
pm> install-package google.apis.drive.v2 -pre

then include:

using Google.Apis.Auth.OAuth2;
using Google.Apis.Services;
using System.IO;
using Google.Apis.Drive.v2;
using Google.Apis.Util.Store;
using System.Threading;

I had the error GoogleWebAuthorizationBroker not found and I fixed by removing the reference to: Google.Apis.Auth.PlatformServices from my project and Going to the folder where I had all google api assemblies and added ....\packages\Google.Apis.Auth.1.8.1\lib\net40\Google.Apis.Auth.PlatformServices.dll

To the project. I believe I had the wrong assembly.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!