Google APIs .NET client library 1.9.2 release! 8


Please Share

Google APIsI have been working with the Google APIs .Net client library now since 2012 it was still in beta when I started using it. I have since then been wondering wishing I could track down the lead developer on the project and have a chat with him. Back in June I got my wish, actually he tracked me down.  We started talking and he asked me for a favor. Deal with issue #238, he didn’t have the time.

For the last several months, I have been working closely with  Eyal Peled the lead developer on the Google APIs .Net Client library. Our goal was to deal with issue #238. For those of you who do not know or are not nerdie enough to track the issues in the client library. Issue #238 was submitted 12 Aug 2012 and is entitled “Strong naming in binaries”.



Changes

I am copying this directly from the blog post announcing the release Announcing the release of 1.9.2

This release is special since we have several new contributors:

The reason I copied it directly yes that’s me!   I am currently the only non Googler allowed to contribute to the Google APIs .Net Client library.  How awesome is that!

What is a strong name binary?

The purpose of a strong name is solely to ensure that when you load an assembly by name, you are loading exactly the assembly you think you are loading. You say “I want to load Google APIs .NET client library, version 1.9.2, that came from Google”. The strong name gear ensures that you actually load precisely that DLL, and not another assembly called Google APIs .NET client library, version 1.9.2, that came from Dr. Evil Enterprises. You can then set security policy which says “if I have an assembly from Google on my machine, fully trust it.” These scenarios are the only by-design purposes of strong names.

The funny thing is I actually added my name to this issue way back in 2013 not long after I started working with the Google APIs I was hoping I could use the client library in my project. After a lot of research and hair, pulling out I found I could not use the client library because it wasn’t strong name signed. This forced me to access the Google APIs the hard way I had to code it all from the ground up.

I am creating a SSIS connection manager and need strong named dll’s. But have
run into a problem when adding the strong names myself.

When strong naming both Google.Apis.dll and Google.Apis.Authentication.OAuth2.dll
and adding them into a project (add reference) an error occurs about missing
assembly reference Google.Apis.Authentication.Iauthenticator. When adding the
weak named Google.Apis the error disappears. But Again they need to be strong
named to add them to GAC. Anyone know of a fix?

Original comment by laurl…@gmail.com on 13 May 2013 at 12:04

In the end, I realize that I would have not been able to use the library even if it had been signed. My SSIS task supports .Net framework 3.5 the Google APIs .Net client library only supports .Net framework 4.0 and 4.5.

Conclusion

With release 1.9.2 of the Google APIs .Net client library it is now possible to add, the library to your .dll projects and add them to GAC.
You can also now verify that the .dll on your machine is in fact the one we have released and not some evil version of it. I will be looking into adding some documentation on how to verify the dlls but it will not be until after I get back from vacation.

Please Share


Linda Lawton

About Linda Lawton

My name is Linda Lawton I have more than 20 years experience working as a developer and a database expert. I have been working with several of the Google APIs, since 2012. I helping others in the On-Line community to develop with the Google APIs, by creating my own blog www.daimto.com. This and my presence on a number of On-Line developer forums lead me to be noticed by the Google Analytics API development team. I was nominated for and recently became one of the first Google Developer Experts for Google Analytics.


Leave a comment

Your email address will not be published. Required fields are marked *

8 thoughts on “Google APIs .NET client library 1.9.2 release!

  • Vinay

    Hi,

    I’m trying to access Google Calendar events via Public Key, as I’ve a server side application & no manual interaction is possible to accept or deny access.

    While I’m running that, I’m getting following issue;

    A first chance exception of type ‘Google.GoogleApiException’ occurred in Google.Apis.dll

    at Google.Apis.Requests.ClientServiceRequest`1.Execute() in c:\code\github\google-api-dotnet-client\Tools\Google.Apis.Release\bin\Release\1.9.2\default\Src\GoogleApis\Apis\Requests\ClientS
    uest.cs:line 96

    On the contrary, if I’m running same code with OAuth credentials, it works. But, the request configured with Public Key is not working. In my scenario, I cannot implement approach where acknowledgement or acceptance is required. I need to do this in server side code, which can access potentially anybody’s public calendar.

    Please suggest.

    complete stack,

    Exception: Google.Apis.Requests.RequestError
    Not Found [404]
    Errors [
    Message[Not Found] Location[ – ] Reason[notFound] Domain[global]
    ]

    at Google.Apis.Requests.ClientServiceRequest`1.Execute() in c:\code\github\google-api-dotnet-client\Tools\Google.Apis.Release\bin\Release\1.9.2\default\Src\GoogleApis\Apis\Requests\ClientServiceReq
    uest.cs:line 96

      • Vinay

        HI,

        Thanks for your reply.

        That is the issue. In my scenario, I cannot request anybody to make their calendar public.

        I want to build server side API, which can help in returning calendar info of participants. This API will be called by different UI integrators, who will read calendar info of different participants, & present it on UI.

        How can I build such solution?

        • Vinay

          I’ve also tried to use Service account, but it returns me following error;

          Exception: Google.Apis.Requests.RequestError
          Not Found [404]
          Errors [
          Message[Not Found] Location[ – ] Reason[notFound] Domain[global]
          ]

          at Google.Apis.Requests.ClientServiceRequest`1.Execute() in c:\code\github\google-api-dotnet-client\Tools\Google.Apis.Release\bin\Release\1.9.2\default\Src\GoogleApis\Apis\Requests\ClientServiceReq
          uest.cs:line 96

          And,
          It only works for the case, where I’ve made my calendar public.

  • Burt

    Is it possible to access my Gmail account using the ServiceAccountCredential? I am writing a Windows Service that checks a user’s GMail account every so often, and I cannot seem to get past the authentication part when using ServiceAccountCredential. It works without any problem if I use UserCredentials.