Support for gRPC

Up to v13.0.2, the Google Ads API .NET library used the Grpc.Core library for gRPC functionality. As of version 14.0.0 of the client library, we're using Grpc.Net.Client as the default library for gRPC functionality, with Grpc.Core as the fallback. This guide covers the technical details related to this change.

Reason for the switch

Grpc.Core is scheduled for sunset, and Grpc.Net.Client is the official C# implementation of gRPC going forward. Read the announcement.

Changes to the Google Ads API .NET library

As part of the switch, we've made the following changes to our client library.

  1. Introduced a new GoogleAdsConfig setting named UseGrpcCore.

    • This setting defaults to false.
    • When this setting is set to false, the library attempts to use Grpc.Net.Client as the underlying transportation layer when possible.

      Grpc.Net.Client doesn't support some older .NET runtime versions (see requirements). On these platforms, the Google Ads API .NET library will fall back to using the Grpc.Core library as the underlying transportation layer.

    • You can force the Google Ads API .NET library to use Grpc.Core library all the time by setting UseGrpcCore to true.

  2. The Google Ads API .NET library depends on the Google.Api.Gax.Grpc package (part of Google Cloud SDK). Due to the gRPC library change, this package has updated its .NET Framework major version to 4.0.0 and its runtime requirement to .NET Standard 2.1.

    As a result, the Google Ads API .NET library runtime requirement has been updated to .NET Standard 2.1. The Google Ads API library continues to support .NET Framework 4.7.2+ and .NET 5.0+.