Home

Nov 15, 2011

CRM 2011–Code Generation Tool (CrmSvcUtil.exe) for early bound entities

Code generation tools helps you to generate typed classes for all CRM entities and it’s attributes. This output file contains one class for each entity, providing early binding and IntelliSense to aid you as you write custom code. It is available with CrmSdk.

Note – CrmSvcUtil.exe requires Microsoft.Crm.Sdk.Proxy.dll (onpremise) and Microsoft.Xrm.Sdk.dll (online).

For On-Premise installation refer below command (select the CrmSvcUtil.exe folder in command prompt) -

Command Line  -

CrmSvcUtil.exe /url:http://<servername>/<organizationname>/XRMServices/2011/Organization.svc
/out:<outputfilename>.cs /username:<username> /password:<password> /domain:<domainname>
/namespace:<outputnamespace> /serviceContextName:<service context name>
Usage Example -
CrmSvcUtil.exe /url:http://192.68.150.175/TestOrg/XRMServices/2011/Organization.svc
/out:xrm.cs /username:administrator /password:welcome!2 /domain:contoso
/namespace:TestOrg.Entities /serviceContextName:DataContextTestOrg

More details about Code Generation Tool can be found at below links -


Create Early Bound Entity Classes with the Code Generation Tool (CrmSvcUtil.exe)


http://msdn.microsoft.com/en-us/library/gg327844.aspx


Create Extensions for the Code Generation Tool


http://msdn.microsoft.com/en-us/library/hh547384.aspx


Happy Coding,

No comments: