In this article, I going to explain how to create early-bound entity classes with the code Generation Tool(CrmSvcUtil.exe)
You can find the utility in the SDK download package in the SDK\Bin folder.The classes created by the code generation tool are designed to be built into a class library that can be referenced by projects that use Microsoft Dynamics CRM. After you have generated the classes using the tool, you should add the file that contains the classes to your Visual Studio project or solution
Assemblies Need to Include
Microsoft.Crm.Sdk.Proxy.dll
Microsoft.Xrm.Sdk.dll
Run the Code Generation Utility
Run this utility from the SDK\Bin folder. If you run the utility from another location, the Microsoft.Xrm.Sdk.dll assembly, located in the SDK\Bin folder, must be located in the same folder
Format for running the utility from the 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>
Examples to use the code generation utility from the command line for each deployment type
Claims Authentication Active Directory
CrmSvcUtil.exe /url:http://CRM2011:5555/Org/XRMServices/2011/Organization.svc /out:GeneratedCode.cs /username:administrator /password:password
Microsoft Dynamics CRM Online
CrmSvcUtil.exe /url:https://org.crm.dynamics.com/XRMServices/2011/Organization.svc /out:GeneratedCode.cs /username:"myname@live.com" /password:"myp@ssword!" /deviceid:"9eqd9qip4meckbxhyi838gn3" /devicepassword:"543opae9itRWKO+U7fe+I3MRVANUyFFPcfDJYP5ItZo="
Claims Authentication - IFD
CrmSvcUtil.exe /url:https://org.crm.com:5555/XRMServices/2011/Organization.svc /out:GeneratedCode.cs /username:administrator /password:p@ssword!
You can find the utility in the SDK download package in the SDK\Bin folder.The classes created by the code generation tool are designed to be built into a class library that can be referenced by projects that use Microsoft Dynamics CRM. After you have generated the classes using the tool, you should add the file that contains the classes to your Visual Studio project or solution
Assemblies Need to Include
Microsoft.Crm.Sdk.Proxy.dll
Microsoft.Xrm.Sdk.dll
Run the Code Generation Utility
Run this utility from the SDK\Bin folder. If you run the utility from another location, the Microsoft.Xrm.Sdk.dll assembly, located in the SDK\Bin folder, must be located in the same folder
Format for running the utility from the 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>
Examples to use the code generation utility from the command line for each deployment type
Claims Authentication Active Directory
CrmSvcUtil.exe /url:http://CRM2011:5555/Org/XRMServices/2011/Organization.svc /out:GeneratedCode.cs /username:administrator /password:password
Microsoft Dynamics CRM Online
CrmSvcUtil.exe /url:https://org.crm.dynamics.com/XRMServices/2011/Organization.svc /out:GeneratedCode.cs /username:"myname@live.com" /password:"myp@ssword!" /deviceid:"9eqd9qip4meckbxhyi838gn3" /devicepassword:"543opae9itRWKO+U7fe+I3MRVANUyFFPcfDJYP5ItZo="
Claims Authentication - IFD
CrmSvcUtil.exe /url:https://org.crm.com:5555/XRMServices/2011/Organization.svc /out:GeneratedCode.cs /username:administrator /password:p@ssword!
No comments:
Post a Comment
Note: only a member of this blog may post a comment.