C# ServiceAccountCredential引发未实现的异常

C# ServiceAccountCredential引发未实现的异常,c#,xamarin.forms,x509certificate2,service-accounts,notimplementedexception,C#,Xamarin.forms,X509certificate2,Service Accounts,Notimplementedexception,这里的新手,兴奋地问我的第一个问题。:-) 我正在用Visual Studio 2015中的Xamarin.Forms(shproj)编写一个C#应用程序,需要使用以下服务帐户将数据库上载到我的Google Drive中的文件夹中。我使用安卓设备进行USB调试。每当我尝试创建上载所需的ServiceAccountCredential时,就会抛出一个“System.NotImplementedException:未实现该方法或操作”。这是相应的标记代码: var certificate = new

这里的新手,兴奋地问我的第一个问题。:-)

我正在用Visual Studio 2015中的Xamarin.Forms(shproj)编写一个C#应用程序,需要使用以下服务帐户将数据库上载到我的Google Drive中的文件夹中。我使用安卓设备进行USB调试。每当我尝试创建上载所需的ServiceAccountCredential时,就会抛出一个“System.NotImplementedException:未实现该方法或操作”。这是相应的标记代码:

var certificate = new X509Certificate2(CertificateBytes, "notasecret", X509KeyStorageFlags.Exportable);
        var credential = new ServiceAccountCredential(new ServiceAccountCredential.Initializer(serviceAccountEmail)
        {
            Scopes = scopes
        }.FromCertificate(certificate));
基本上,我遇到了与第二个标志相同的问题,但没有编写第一部分

在我不得不更改为新的Windows映像并再次安装Visual Studio 2015之前,上传工作非常顺利。我尝试创建一个新项目并重新安装所有连接的软件包,但仍然没有成功


请问,有人知道如何修复此问题吗?

尝试在项目中使用此文件。此文件立即生效,非常感谢!:-)你是个英雄!请尝试在项目中使用此文件。此文件立即生效,非常感谢!:-)你是个英雄!