CRM client APIs help us to connect with CRM easily from .NET applications. It simplifies setting up connections with CRM using a simplified connection string. We can use this connection string to create organization service objects.
Perform the following setup on the console application for demo purposes:
Connect to Visual Studio and select File | New | Project.
Select Visual C# | Console Application and enter
CRMConnectiondemo
in the Name textbox:Right-click on References and add the following CRM SDK:
Microsoft.Xrm.SDK
Microsoft.Xrm.Client
We also need to add the following .NET assemblies:
System.Runtime.Serialization
System.Configuration
Make sure to add the
App.config
file if not available in the project. We need to right-click on the project name and select Add Item, and add the application configuration file as follows...