-
Notifications
You must be signed in to change notification settings - Fork 16
cli server
PhuocLe edited this page Jun 20, 2026
·
2 revisions
URL: https://github.com/phuocle/Dynamics-Crm-DevKit/wiki/cli-server
The server command deploys Plugin, Custom Action, Custom API, Workflow, and Data Provider assemblies (.dll or .nupkg) to Dynamics 365 / Dataverse.
devkit server --conn "YourConnectionString" --json "DynamicsCrm.DevKit.Cli.json" --profile "ProfileName"| Parameter | Description | Example |
|---|---|---|
--conn |
Dynamics 365 connection string | --conn "AuthType=ClientSecret;Url=https://yourorg.crm.dynamics.com;..." |
--json |
Path to DynamicsCrm.DevKit.Cli.json file | --json "DynamicsCrm.DevKit.Cli.json" |
--profile |
Profile name from json file | --profile "DEBUG" |
| Parameter | Description | Example |
|---|---|---|
--sdk-login |
Use SDK login dialog | --sdk-login |
--onlyupdateassembly, --only-assembly
|
Only update assembly without registering steps | --only-assembly |
--type |
Optional server profile type: servers, plugins, workflows, dataproviders. |
--type plugins |
Add a servers section in your DynamicsCrm.DevKit.Cli.json:
{
"servers": [
{
"profile": "DEBUG",
"solution": "YourSolution",
"folder": "bin\\Debug",
"includefiles": [
"*.dll",
"*.nupkg"
],
"excludefiles": [
"*.pdb",
"Microsoft.*.dll"
]
}
]
}| Property | Type | Required | Description |
|---|---|---|---|
profile |
string | Yes | Profile identifier |
solution |
string | Yes | Target solution unique name |
folder |
string | Yes | Folder path containing assemblies (relative to json file) |
includefiles |
array | Yes | File patterns to include (e.g., ["*.dll", "*.nupkg"]) |
excludefiles |
array | Yes | File patterns to exclude (e.g., ["*.pdb", "Microsoft.*.dll"]) |
The task automatically registers:
- Plugins - Steps with Pre/Post images
- Custom Actions - Custom workflow actions
- Custom APIs - Custom APIs
- Workflows - Custom workflow activities
- Data Providers - Virtual entity data providers
- Automatically detects plugin types from
[CrmPluginRegistration]attributes - Registers/updates plugin steps, images, and secure configurations
- Handles plugin isolation modes (Sandbox/None)
- Only updates changed assemblies
- Preserves existing registrations
- Updates secure configurations
- Manages plugin step states (Active/Inactive)
- Supports .dll files
- Supports .nupkg (NuGet packages) for plugin packages
- Extracts and deploys assemblies from NuGet packages
- Registers virtual entity data providers
- Links data sources with CRUD operations
- Validates data source existence
DynamicsCrm.DevKit.Cli.exe ^
/conn:"AuthType=Office365;Url=https://contoso.crm.dynamics.com;Username=admin@contoso.com;Password=pass" ^
/json:"DynamicsCrm.DevKit.Cli.json" ^
/type:servers ^
/profile:"DEBUG"DynamicsCrm.DevKit.Cli.exe ^
/sdklogin:"yes" ^
/json:"DynamicsCrm.DevKit.Cli.json" ^
/type:servers ^
/profile:"DEBUG"DynamicsCrm.DevKit.Cli.exe ^
/conn:"AuthType=Office365;Url=https://contoso.crm.dynamics.com;Username=admin@contoso.com;Password=pass" ^
/json:"DynamicsCrm.DevKit.Cli.json" ^
/type:servers ^
/profile:"DEBUG" ^
/onlyupdateassembly:"yes"The task outputs:
- ? REGISTER - New items registered
- ? UPDATED - Existing items updated
- ? ACTIVATED - Items activated
- ?? DEACTIVATED - Items deactivated
- ?? DO_NOTHING - No changes needed
Solution: Check the folder path is correct and contains the assembly files
Solution: Ensure the solution unique name exists in target environment
Solution: Check [CrmPluginRegistration] attributes are correct and entity logical names exist
- cli-plugin - Deprecated plugin alias
- cli-workflow - Deprecated workflow alias
- cli-dataprovider - Deprecated data provider alias