BBL Admin
BBL Admin

Reputation: 57

Multiple Files from Google Client library - Drive API's Not Found

I've installed Google.Api.Drives.v2 from Nuget without issue, but when I attempt to create the DriveService object, I get multiple file not found errors. I used to get this occasionally when I ran Windows 8.1, VS2013, but with different Google Drive objects, and it was never so show stopping. Since upgrading to VS2015, I am unable to get it to work, I've even completely removed all references to the Google Api's and reinstalled the packages and reset the references. Here's the C# code I'm running:

            ClientSecrets GoogleSecrets = new ClientSecrets();
            GoogleSecrets.ClientId = ClientID;
            GoogleSecrets.ClientSecret = ClientSecret;
            credential = GoogleWebAuthorizationBroker.AuthorizeAsync(GoogleSecrets,

                new[] { DriveService.Scope.Drive },
                "user",
                CancellationToken.None,
                new FileDataStore("Test")).Result;

And here's a picture of what I get when I debug:

enter image description here

If I continue to step through, I get this error for a ton of other files. Some examples: GoogleWebAuthorizationBroker.cs, GoogleAuthorizationCodeFlow.cs, etc.

Eventually if I keep stepping through I get a System.AggregateException: An unhandled exception of type 'System.AggregateException' occurred in mscorlib.dll

I'm sure it's something silly and simple. Any advice would be most helpful, thank you!

Upvotes: 1

Views: 266

Answers (1)

Mithun
Mithun

Reputation: 11

I found the solution. Follow these steps:

  1. In visual studio go to Tools > Import and export settings

  2. Select Reset all settings and click Next.

  3. Done

enter image description here

Upvotes: 1

Related Questions