Get Started Using C# with Bing Ads Services
To get started developing Bing Ads applications with a .NET language, you can start with the provided examples or follow one of the application walkthroughs for a Web or Desktop application. The examples have been developed with the Bing Ads .NET SDK and Visual Studio Community. Your custom configuration may vary.
You will need user credentials with access to Bing Ads either in production or sandbox. For the production environment you will need a production developer token. All sandbox clients can use the universal sandbox developer token i.e., BBD37VB98. For more information, please see Get Started With the Bing Ads API and Sandbox.
To authenticate with a Microsoft Account (email address user name) in production, you must also must register an application and get the corresponding client identifier. You also need to take note of the client secret and redirect URI if you are developing a web application. For authentication details, see Authentication With the SDKs.
Install the SDK
Install the Bing Ads .NET SDK through NuGet, either through the Manage NuGet Packages user interface, or through the Package Manager Console. For information about installing NuGet, see http://docs.nuget.org.
The Bing Ads .NET SDK supports .NET Standard 2.0. You can choose from a variety of platforms e.g., .NET Core or .NET Framework 4.6.1. The Bing Ads API examples are developed via Visual Studio Community 2017 and target .NET Framework 4.7.1. The .NET Standard 2.0 and Bing Ads .NET SDK do not support .NET Framework versions lower than 4.6.1. For more information on .NET Standard and how it relates to other .NET frameworks, refer to this article on .NET Standard.
NuGet Package Manager Console
- Click on Tools -> NuGet Package Manager -> Package Manager Console.
- Choose the default project where you want the SDK installed, and then within the console command line, type
- If you do not already have references to System.ServiceModel.Primitives 4.4.1, System.ServiceModel.Http 4.4.1, and System.ServiceModel.ConfigurationManager 4.4.1, type
Install-Package System.ServiceModel.Primitives -Version 4.4.1,
Install-Package System.ServiceModel.Http -Version 4.4.1, and
Install-Package System.Configuration.ConfigurationManager -Version 4.4.1.