Error after upgrading Microsoft.BingAds.SDK to 13.0.18 due to a Falcon compliance team alert

Juyi Wu 35 Reputation points Microsoft Employee
2024-02-18T12:41:07.5766667+00:00

After upgrading Microsoft.BingAds.SDK from 13.0.11 to 13.0.18 due to a Falcon compliance team alert, we encountered an error when creating a new ServiceClient<ICustomerManagementService> in our code. The exception thrown is like:
Message: The type initializer for 'Microsoft.BingAds.RestServiceClient' threw an exception. InnerException Message: Could not load file or assembly 'System.Text.Json, Version=7.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. The system cannot find the file specified. InnerException StackTrace: at Microsoft.BingAds.RestServiceClient..ctor(AuthorizationData authorizationData, Nullable1 environment)    at Microsoft.BingAds.ServiceClient1..ctor(AuthorizationData authorizationData, Nullable`1 environment)
What is the solution to resolve this issue?

Microsoft Advertising API
Microsoft Advertising API
A Microsoft API that provides programmatic access to Microsoft Advertising to manage large campaigns or to integrate your marketing with other in-house systems.
432 questions
{count} vote

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.