Tuesday, December 24, 2013

Commands

        Below are the useful commands used in Microsoft related products like .Net, CRM,...

Click on the item below to go through the description about that.

Assembly Registration:

The Assembly Registration tool reads the metadata within an assembly and adds the necessary entries to the registry, which allows COM clients to create .NET Framework classes transparently.

If you’re running Visual Studio on Windows 7: Choose Start, and then choose All Programs, Microsoft Visual Studio, Visual Studio Tools, Visual Studio Command Prompt.
                    
regasm <DLLFilePath> /codebase /tlb

Ex: regasm C:\Testing.dll /codebase /tlb
                    
                

ILMerge:

ILMerge is a utility that can be used to merge multiple .NET assemblies into a single assembly.

- Download ILMerge software from here and install in your machine.
- Goto Start, Run, cmd, OK.
- Goto C:\Program Files (x86)\Microsoft\ILMerge folder path and run below command.
                    
ilmerge /lib:<AssembliesFolderPath> <DLL1> <DLL2> <DLL3> <DLL4> /out:<OutputDLL>

Ex: ilmerge /lib:"C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\PublicAssemblies" C:\FirstDLL.dll C:\SecondDLL.dll C:\ThirdDLL.dll /out:C:\FinalDLL.dll
                    
                

Create Early Bound Classes:

CrmSvcUtil.exe is a command-line code generation tool for use with Microsoft Dynamics CRM 2011. This tool generates early-bound .NET Framework classes that represent the entity data model used by Microsoft Dynamics CRM. This tool is in the SDK download package in the SDK\Bin folder.

- Goto Start, Run, cmd, OK.
- Goto SDK\bin folder path and run below command.
                    
CrmSvcUtil.exe /codeCustomization:"Microsoft.Xrm.Client.CodeGeneration.CodeCustomization, Microsoft.Xrm.Client.CodeGeneration" /out:<OutputFile> /url:<OrganizationURL> /domain:<Domain> /username:<UserName> /password:<Password> /namespace:<Namespace> /serviceContextName:<serviceContext>
Ex: CrmSvcUtil.exe /codeCustomization:"Microsoft.Xrm.Client.CodeGeneration.CodeCustomization, Microsoft.Xrm.Client.CodeGeneration" /out:Xrm\Xrm.cs /url:http://MyCRM/MyOrg/XRMServices/2011/Organization.svc /domain:mscrm /username:administrator /password:mypassword123 /namespace:Xrm /serviceContextName:XrmServiceContext
For Online instance, you need to register your device as here.
                    
                    
CrmSvcUtil.exe /url:<OrgnizationURL> /out:<OutputFile> /username:<UserName> /password:<Password> /deviceid:<DeviceID> /devicepassword:<DevicePassword>
Ex: CrmSvcUtil.exe /url:https://myorg.crm.dynamics.com/XRMServices/2011/Organization.svc /out:GeneratedCode.cs /username:"myname@live.com" /password:"mypassword123" /deviceid:"9eqd9qip4meckbxhyi838gn3" /devicepassword:"543opae9itRWKO+U7fe+I3MRVANUyFFPcfDJYP5ItZo="
                    
                

Device Registration:

CRM SDK has provided a tool to register your device. Goto Command Prompt then to the folder path SDK\tools\deviceregistration\bin\Debug. Run below command. This will register you device and give Device Username and Device Password.
                    
deviceregistration.exe /operation:Register
                    
                

No comments:

Post a Comment