CLI Documentation.

Starting with v5, XrmToolkit has an CLI that allows you to deploy custom plugin and workflow assemblies to Dynamics 365 from a command line. The CLI can be downloaded here.

To use the XrmToolkit CLI command line, you must first register your license on the computer in which it is installed. If you have Visual Studio installed on the computer, then you can just install the XrmToolkit addin and register your license that way. If this is on a build server or another computer where Visual Studio is not installed, you will need to run a command to register your license.

Open a command prompt and navigate to where the CLI was installed. The default installation folder is: "C:\Program Files (x86)\Simpler Software\XrmToolkit CLI\"

Run the following command: XrmToolkit.Cli.exe RegisterLicenseKey [your license key here]


Commands

To get a list of available commands, use the -?, -h, or --help option. Currently there are 3 commands available:


To get help regarding any command, use the following arguments: XrmToolkit.Cli.Exe [CommandName] --help

The following demonstrates this on the 'RegisterLicenseKey' command:

Merge Project

Using the 'MergeProject' command, you can merge (ILMerge) your assemblies taking into account the XrmToolkit settings for that project.

The following options are available for the MergeProject command:


To build a project using the ILMerge settings, use something similar to the following:

XrmToolkit.Cli.exe MergeProject -url=http://crm/orgname -vs="D:\CRM Solution\CRM Solution.sln" -proj="CRM Solution.Plugins.csproj" -b=DEBUG -plat=AnyCPU

Publish Project To Crm

Using the 'PublishProjectToCrm' command, you can publish your custom plugin or workflow assembly to Dynamics365. This does not perform the merge operation and so you will need to use the 'MergeProject' command before this one if your assembly needs to be merged first.

The following options are available for the 'PublishProjectToCrm' command:


To publish a plugin or workflow assembly to Dynamics 365, use something similar to the following:

PublishProjectToCrm -url=http://crm/orgname -u=username -p=password -vs="D:\CRM Solution\CRM Solution.sln" -proj="CRM Solution.Plugins.csproj" -b=DEBUG -plat=AnyCPU