Sunday, June 1, 2014

1.8.2 is here :)

Hi all,
Several days ago I released a new version of the core Google APIs client library for .NET (version 1.8.2)

This release includes several bug fixes, such as fixing MaxUrlLengthInterceptor to not delete the last character of a URL and improving FileDataStore to support an absolute path folder.

The full issues list is available in the library's latest blogpost.

In addition, from this release we support token revocationUserCredential now contains a new RevokeTokenAsync method which revokes the current token.

Later on, you can reauthorize the user again by calling GoogleWebAuthorizationBroker's ReauthorizeAsync. By doing so, the user will have to reauthorize your application to use his or her private resources.

Take a look in the following snippet:

Note the following:
  1. You should already be familiar with lines 1-20. Those lines contain the creation of user credentials and a book service, and a sample request to this service.
  2. In line 23 there is a call to the new RovokeTokenAsync method. From this point the access token is invalid and it is removed form the data store.
  3. Then, any request using the current credentials will fail, because the access token was revoked (lines 25-33).
  4. In this point, the user can reauthorize the application again to access his or her private resources, by calling to ReauthorizeAsync (line 37).

While working on this release I encountered the following error over and over again while trying to compile a Windows Phone sample using the new 1.8.2 library:

Error 3 Cannot resolve reference assemblies. Please check the reference assemblies. Cannot resolve dependency to assembly 'Google.Apis, Version=, Culture=neutral, PublicKeyToken=null' because it has not been preloaded. When using the ReflectionOnly APIs, dependent assemblies must be pre-loaded or loaded on demand through the ReflectionOnlyAssemblyResolve event.

It took me a lot of time to understand what is the exact problem, and I finally found a solution in this blogpost:
Thanks Mr. Gill :) 
All I had to do is to change the following line in the Windows Phone project file:
And set the validate XAML tag to false.
That's all.

SF view from the Golden Gate Bridge, May 2014

The countdown continues... In 10 days I'm going to arrive in Brazil and in 12 days I'm going to watch my first world cup game ever. And... what an amazing game to start with: Spain-Holland.
Bom dia amigos!

No comments:

Post a Comment