1

新手在这里,很高兴问我的第一个问题。:-)

我正在使用 Visual Studio 2015 中的 Xamarin.Forms (shproj) 在 C# 中编写一个应用程序,该应用程序需要按照这些说明使用服务帐户将数据库上传到我的 Google Drive 中的文件夹。我使用 Android 设备进行 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 之前,上传工作完美。我尝试创建一个新项目并重新安装所有连接的包,但仍然没有运气......

请问,有人知道如何解决这个问题吗?

4

0 回答 0