DynamicsCrm.DevKit.Cli 4.0.0

dotnet add package DynamicsCrm.DevKit.Cli --version 4.0.0
                    
NuGet\Install-Package DynamicsCrm.DevKit.Cli -Version 4.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="DynamicsCrm.DevKit.Cli" Version="4.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="DynamicsCrm.DevKit.Cli" Version="4.0.0" />
                    
Directory.Packages.props
<PackageReference Include="DynamicsCrm.DevKit.Cli" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add DynamicsCrm.DevKit.Cli --version 4.0.0
                    
#r "nuget: DynamicsCrm.DevKit.Cli, 4.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package DynamicsCrm.DevKit.Cli@4.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=DynamicsCrm.DevKit.Cli&version=4.0.0
                    
Install as a Cake Addin
#tool nuget:?package=DynamicsCrm.DevKit.Cli&version=4.0.0
                    
Install as a Cake Tool
  ____                              _           ____                  ____             _  ___ _     ____ _ _
 |  _ \ _   _ _ __   __ _ _ __ ___ (_) ___ ___ / ___|_ __ _ __ ___   |  _ \  _____   _| |/ (_) |_  / ___| (_)
 | | | | | | | '_ \ / _` | '_ ` _ \| |/ __/ __| |   | '__| '_ ` _ \  | | | |/ _ \ \ / / ' /| | __|| |   | | |
 | |_| | |_| | | | | (_| | | | | | | | (__\__ \ |___| |  | | | | | |_| |_| |  __/\ V /| . \| | |_ | |___| | |
 |____/ \__, |_| |_|\__,_|_| |_| |_|_|\___|___/\____|_|  |_| |_| |_(_)____/ \___| \_/ |_|\_\_|\__(_)____|_|_|
        |___/            https://github.com/phuocle/Dynamics-Crm-DevKit 4.00.00.00 Build: 31.12.2025 23:59:59

DynamicsCrm.DevKit.Cli - Command Line Interface

A comprehensive CLI tool for Dynamics 365/Dataverse deployment automation and code generation.


Overview

DynamicsCrm.DevKit.Cli is a modern, feature-rich command-line tool for automating Dynamics 365 CE / Dataverse development tasks including:

  • Plugin & Workflow deployment
  • Web Resource management
  • Solution packaging
  • Code generation (JavaScript, TypeScript, C#)
  • Report management
  • Virtual Entity/Data Source creation
  • Early-bound class generation

Installation

NuGet Package

Download and install the NuGet package to your project using one of the following methods:

Option 1: Visual Studio Package Manager Console
Install-Package DynamicsCrm.DevKit.Cli
Option 2: .NET CLI
dotnet add package DynamicsCrm.DevKit.Cli
Option 3: Direct Download from NuGet.org
# Download from https://www.nuget.org/packages/DynamicsCrm.DevKit.Cli
# Extract the .nupkg file (it's a zip file)
# The CLI executable is located in the tools/ folder

After installation, the CLI executable (DynamicsCrm.DevKit.Cli.exe) and its dependencies can be found in:

  • Visual Studio: packages\DynamicsCrm.DevKit.Cli.<version>\tools\
  • SDK-style projects: ~\.nuget\packages\dynamicscrm.devkit.cli\<version>\tools\

Note: This is NOT a dotnet global tool. The dotnet tool install --global command is not supported.

Prerequisites

  • .NET Framework 4.8
  • Microsoft.CrmSdk.CoreTools (for CrmSvcUtil and SolutionPackager)

Command-Line Arguments

Required Arguments

Argument Description Example
/json Path to configuration file /json:"DynamicsCrm.DevKit.Cli.json"
/type Task type to execute /type:servers
/profile Configuration profile /profile:default

Authentication Arguments

Option 1: Connection String
/conn:"AuthType=OAuth;Username=user@org.onmicrosoft.com;Password=****;Url=https://org.crm.dynamics.com"
Option 2: SDK Login (OAuth Browser)
/sdklogin:yes /url:"https://org.crm.dynamics.com"

Optional Arguments

Argument Description Default
/version Version number 1.0.0.0
/command Additional commands ""
/onlyupdateassembly Fast deploy (assembly only) ""

Task Types

Type Description
servers Deploy plugins/workflows/custom APIs/data providers
plugins Deploy plugins only
workflows Deploy workflows only
dataproviders Deploy data providers only
webresources Deploy web resources
downloadwebresources Download web resources from instance
proxytypes Generate early-bound classes
generators Generate code (JS/TypeScript/C#)
solutionpackagers Extract/Pack solutions
uploadreports Upload reports
downloadreports Download reports from instance
datasources Create virtual entities/data sources

Configuration File

Create DynamicsCrm.DevKit.Cli.json in your project root:

{
  "solution": "YourSolution",
  "type": "servers",
  "profile": "default",
  "servers": [
    {
      "profile": "default",
      "solution": "YourSolution",
      "folder": "..\\..\\YourProject\\bin\\Release",
      "includefiles": ["*.dll"],
      "excludefiles": ["Microsoft.*.dll", "System.*.dll"]
    }
  ]
}

Usage Examples

1. Deploy Plugins

DynamicsCrm.DevKit.Cli /conn:"ConnectionString" /json:"DynamicsCrm.DevKit.Cli.json" /type:servers /profile:default

2. Deploy Web Resources

DynamicsCrm.DevKit.Cli /conn:"ConnectionString" /json:"DynamicsCrm.DevKit.Cli.json" /type:webresources /profile:default

3. Generate Early-Bound Classes

DynamicsCrm.DevKit.Cli /conn:"ConnectionString" /json:"DynamicsCrm.DevKit.Cli.json" /type:proxytypes /profile:default

4. Extract Solution

DynamicsCrm.DevKit.Cli /conn:"ConnectionString" /json:"DynamicsCrm.DevKit.Cli.json" /type:solutionpackagers /profile:default

5. SDK Login (OAuth)

DynamicsCrm.DevKit.Cli /sdklogin:yes /url:"https://org.crm.dynamics.com" /json:"DynamicsCrm.DevKit.Cli.json" /type:servers /profile:default

Key Features

Plugin & Workflow Deployment

  • 4 Images support (Image1-4)
  • Managed Identity support
  • Custom API registration
  • Data Provider registration
  • Step ID tracking (Id property for idempotent deployments)
  • RunAs user impersonation
  • Multiple source types: Database, Disk, AzureWebApp, FileStore
  • Batch processing (50 operations per batch)
  • Unregister support
  • Fast deploy option (assembly only)

Web Resource Management

  • ✅ 15+ file types (HTML, CSS, JS, PNG, SVG, RESX, etc.)
  • Dependency management with XML generation
  • Pattern matching (include/exclude)
  • Entity token replacement ([entity] pattern)
  • Download from instance
  • Batch publish

Code Generation

  • JavaScript Form (JsForm) - IntelliSense for form scripting
  • JavaScript WebAPI (JsWebApi) - Type-safe WebAPI calls
  • C# Late-Bound - Entity helpers
  • TypeScript definitions (.d.ts)

Solution Packaging

  • Direct export from instance before extraction
  • Both managed/unmanaged in single operation
  • Auto-version formatting
  • Map file support

Report Management

  • Upload/Download RDL files
  • Multi-language support
  • Solution integration

Virtual Entity Support

  • Data Source creation
  • External name mapping
  • Entity metadata validation

CrmPluginRegistrationAttribute Properties

Core Properties

  • Id - Step GUID for idempotent deployments
  • Message - SDK message name
  • EntityLogicalName - Target entity
  • Stage - PreValidation/PreOperation/PostOperation
  • ExecutionMode - Synchronous/Asynchronous
  • FilteringAttributes - Comma-separated attributes
  • Name - Step name
  • ExecutionOrder - Step execution order
  • IsolationMode - Sandbox/None/External

Advanced Properties

  • Unregister - Unregister plugin step
  • RunAs - Impersonate user GUID
  • SourceType - Database/Disk/AzureWebApp/FileStore
  • PluginType - Plugin/Workflow/CustomAction/CustomApi/DataProvider
  • DataSource - Data provider data source name
  • DeleteAsyncOperation - Auto-delete async jobs
  • Offline - Offline execution
  • Server - Server execution

Image Support (4 Images)

  • Image1Name, Image1Alias, Image1Type, Image1Attributes
  • Image2Name, Image2Alias, Image2Type, Image2Attributes
  • Image3Name, Image3Alias, Image3Type, Image3Attributes
  • Image4Name, Image4Alias, Image4Type, Image4Attributes

Advanced Scenarios

Managed Identity Plugin

[assembly: DynamcisCrmDevKitPluginManagedIdentityAssembly("YourClientId")]

[CrmPluginRegistration(
    Message = "Update",
    EntityLogicalName = "account",
    Stage = StageEnum.PostOperation,
    ExecutionMode = ExecutionModeEnum.Synchronous,
    Name = "Account Update",
    Id = "12345678-1234-1234-1234-123456789012"
)]
public class AccountUpdate : IPlugin
{
    public void Execute(IServiceProvider serviceProvider)
    {
        // Implementation
    }
}

Custom API Registration

[CrmPluginRegistration(
    Message = "prefix_CustomApiName",
    Stage = StageEnum.PostOperation,
    ExecutionMode = ExecutionModeEnum.Synchronous,
    PluginType = PluginType.CustomApi,
    Name = "Custom API Handler",
    Id = "87654321-4321-4321-4321-210987654321"
)]
public class CustomApiHandler : IPlugin
{
    // Implementation
}

Data Provider Registration

[CrmPluginRegistration(
    Message = "Retrieve",
    Stage = StageEnum.PostOperation,
    ExecutionMode = ExecutionModeEnum.Synchronous,
    PluginType = PluginType.DataProvider,
    DataSource = "prefix_datasource",
    Name = "Data Provider Retrieve"
)]
public class DataProviderRetrieve : IPlugin
{
    // Implementation
}

CI/CD Integration

Azure DevOps Pipeline

steps:
- task: PowerShell@2
  displayName: 'Deploy Plugins'
  inputs:
    targetType: 'inline'
    script: |
      DynamicsCrm.DevKit.Cli /conn:"$(ConnectionString)" /json:"DynamicsCrm.DevKit.Cli.json" /type:servers /profile:$(Environment)

- task: PowerShell@2
  displayName: 'Deploy Web Resources'
  inputs:
    targetType: 'inline'
    script: |
      DynamicsCrm.DevKit.Cli /conn:"$(ConnectionString)" /json:"DynamicsCrm.DevKit.Cli.json" /type:webresources /profile:$(Environment)

Comparison with spkl

Feature spkl DevKit.Cli
Plugin/Workflow ✅ 2 images 4 images
Managed Identity
Custom API
Data Provider
Step ID Tracking
Report Management
Virtual Entities
Code Generation ✅ 3 types
Download Capabilities
Instrument Command ✅ Use VSIX DynamicsCrmDevKit

Support

There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
4.0.0 188 12/31/2025
3.45.67.89 626 3/31/2025
3.44.44.44 625 12/26/2024
3.33.33.33 2,534 12/31/2023
2.13.33 13,947 9/24/2021
2.12.31 8,497 7/7/2021
2.10.31 9,841 10/31/2020
2.2.29 2,811 3/1/2020
2.1.1 3,917 11/14/2019
2.1.0 2,861 9/30/2019
2.0.0 2,576 7/31/2019

Version 4.0.0:
- Comprehensive CLI for Dynamics 365/Dataverse development automation
- Deploy plugins, custom workflow activities, and web resources
- Generate early-bound entity classes via CrmSvcUtil
- Support for modern Microsoft.PowerPlatform.Dataverse.Client connectivity
- Reports deployment and solution management capabilities