Google Cloud Client Libraries for .NET provide an idiomatic, intuitive, and natural way for .NET developers to integrate with Google Cloud Platform services, like Cloud Datastore and Cloud Storage.

What are they?

The Google Cloud Client Libraries for .NET support accessing Google Cloud Platform services in a way that significantly reduces the boilerplate code you have to write. The libraries provide high-level API abstractions so they're easier to understand. They embrace idioms of C#, work well with the standard library, and integrates better with your codebase. All this means you spend more time creating code that matters to you.

The libraries are configured to access Google Cloud Platform services and authorize (OAuth 2.0) automatically on your behalf. Add the library dependency to your project and get a private key to be up and ready to go. Better yet, if you are running on a Google Compute Engine, authentication is completely automatic.

Example: Retrieving Datastore Entities

using Google.Cloud.Datastore.V1;


DatastoreDb db = DatastoreDb.Create("PROJECT_ID");
Query query = new Query("Book")
    Filter = Filter.Equal("author", "Jane Austen")
foreach (Entity entity in db.RunQueryLazily(query))
    string title = (string) entity["title"];
    DateTime published = (DateTime) entity["published"];
    Console.WriteLine("{0} was published in {1}",
        title, published);


  • Bookshelf - An ASP.NET app that manages a virtual bookshelf using google-cloud-dotnet libraries for Datastore and Storage.


What is the relationship between the google-cloud-dotnet project and the gcloud command-line tool?

Both the gcloud command-line tool and the Google Cloud Client Libraries for .NET are a part of the Google Cloud SDK: a collection of tools and libraries that enable you to easily create and manage resources on the Google Cloud Platform. The gcloud command-line tool can be used to manage both your development workflow and your Google Cloud Platform resources while the libraries provided by the google-cloud-dotnet project are designed for integration within your application code.

What is the relationship between google-cloud-dotnet and the Google APIs Client Library for .NET?

The Google APIs Client Library for .NET is a client library for using the broad set of Google APIs. The google-cloud-dotnet project is built specifically for the Google Cloud Platform and is the recommended way to integrate Google Cloud APIs into your .NET applications. If your application requires both Google Cloud Platform and other Google APIs, the two libraries may be used side-by-side in your application.