1

Newbie here, excited to ask my first quetion. :-)

I am writing an app in C# with Xamarin.Forms (shproj) in Visual Studio 2015 that needs to upload a databank to a folder in my Google Drive using a service account following these instructions. I use an Android device for USB debugging. Whenever I try to create the ServiceAccountCredential that I need for the upload, a "System.NotImplementedException: The method or operation is not implemented." is thrown. This is the corresponding flagged code:

var certificate = new X509Certificate2(CertificateBytes, "notasecret", X509KeyStorageFlags.Exportable);
        var credential = new ServiceAccountCredential(new ServiceAccountCredential.Initializer(serviceAccountEmail)
        {
            Scopes = scopes
        }.FromCertificate(certificate));

Basically, I have the same problem as described here with the second flag, but without having written the first part.

The upload worked perfectly before I had to change to a new Windows image and installed Visual Studio 2015 again. I tried creating a new project and reinstalling all connected packages, but still no luck...

Please, does anyone have an idea how to fix this?

Community
  • 1
  • 1
Nic
  • 11
  • 2
  • https://github.com/Dineshbala1/GoogleDriveAPI-XamarinForms/blob/master/XamarinFormsGoogleDriveAPI-Shared/GoogleDriveShared/GoogleDriveShared/ServiceAccountCredential.cs try to use this file in your project – Dilmah Apr 24 '17 at 05:15
  • This worked instantly, thank you so much! :-) You're a hero! – Nic Apr 24 '17 at 16:28

0 Answers0