As a developer, there can be scenarios where we have to use CRM SDK in our code so as to connect to CRM and use the messages from SDK. To make sure our VS project is ready to use we have to follow some steps.
Even though the title says 2013 this is applicable to 2011 as well.
Even though the title says 2013 this is applicable to 2011 as well.
Prerequisites
Below are the prerequisites for the same.
- Any Visual Studio (even the express edition works): CRM SDK is built on .NET 4.0 so even VS 2010 will work in this case.
- Windows Identity Foundation: If you are using windows 8 or Windows server 2012, then we have to just enable already existing WIF. If you are using windows 7 or windows server 2008, we have install the WIF 3.5. For installing, download it from here.
Once all the prerequisites are in place we can start creating a project which will interact with CRM from our code. Follow the below steps for achieving our target,
- Create a console application for either C# or VB according to our comfort level.
- Make sure the target framework is set to MS .NET framework 4.0. By default it will be client profile.
- Add all the required reference to our project. This includes below references.
- System.Data.Linq
- System.DirectoryServices.AccountManagement
- System.Runtime.Serialization
- System.Security
- System.ServiceModel
- Add the required SDK assembly reference as per our requirement. This is available from the bin folder of respective CRM version SDK.
- Add the required identity reference file. We can get this file from the file location in the system at Program Files\Reference Assemblies\Microsoft\Windows Identity Foundation\v3.5.
We are done with adding the references and now we are ready to go with our development activity.
For every project we have to do this. So its better if we can save this as a project template for our future references.
For detailed Microsoft documentation please refer the original site here.
Hope this helped everyone. :) !!!
No comments:
Post a Comment