D365 DeployerDeploy Web Resources and Plugin Packages to Dynamics 365 CE directly from the VS Code Explorer context menu. Prerequisites1. Power Platform CLI (PAC)Option A — via VS Code extension (recommended) Install the Power Platform Tools extension by Microsoft. PAC CLI is bundled — no separate install needed. Option B — via winget
Option C — via MSI Download and install from: https://aka.ms/PowerAppsCLI Verify:
2. .NET SDK (plugin deployment only)Required for Verify:
3. Connect to your D365 environment
This opens a Microsoft login window. Sign in with an account that has access to the environment.
Web ResourcesProject setupAt the root of the project (workspace folder), create
Project structure
Deploy
Plugin PackagesProject setup1. Expected structureEach plugin project must contain a
2.
|
| Field | Level | Description |
|---|---|---|
prefix |
Root | Publisher prefix used to name new packages: {prefix}_{folderName} |
packages |
Root | Dictionary where the key is the project folder name (not the .csproj filename) |
packages[…].name |
Package | Full package name in Dataverse |
packages[…].packageId |
Package | Package GUID in Dataverse — auto-populated on first deployment; leave empty "" to trigger creation |
packages[…].plugins |
Package | Snapshot of registered assemblies and steps — auto-generated, do not edit manually |
First deployment: if
packageIdis missing or empty, the extension creates the package in Dataverse via the REST API, retrieves its GUID, and writes it back to the file.
3. Auto-generated plugins section
After each successful deployment, the extension fetches the list of plugin assemblies, steps, and images from Dataverse and saves them under plugins. This block is read-only reference data — it gives you a live view of what is registered in D365 without leaving VS Code.
{
"prefix": "mx",
"packages": {
"Plugins.Core": {
"name": "mx_Plugins.Core",
"packageId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"plugins": [
{
"name": "Plugins.Core",
"pluginId": "yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy",
"steps": [
{
"stepId": "zzzzzzzz-zzzz-zzzz-zzzz-zzzzzzzzzzzz",
"name": "MyPlugin.Execute: Create of account",
"mode": 0,
"stage": 20,
"rank": 1,
"filteringAttributes": "",
"preImages": [],
"postImages": []
}
]
}
]
}
}
}
| Step field | Type | Values |
|---|---|---|
mode |
number |
0 = Synchronous · 1 = Asynchronous |
stage |
number |
10 = PreValidation · 20 = PreOperation · 40 = PostOperation |
rank |
number |
Execution order (1 = first) |
filteringAttributes |
string |
Comma-separated filtered attributes (empty = all) |
preImages / postImages |
ImageEntry[] |
Images registered on the step |
Deploy
Right-click a plugin project folder in the Explorer → Deploy Package To CRM
You can select multiple folders at once (Ctrl/Shift multi-select) to deploy several plugins in sequence.
Each selected plugin goes through:
dotnet msbuild -t:Rebuild— full clean rebuildpac plugin push --pluginId <GUID>— pushes to the connected D365 environment- Automatic refresh of the
pluginsblock inPluginDeploymentConfig.json
If
pac plugin pushfails (package not found in D365), the extension offers to create a new package automatically.
Diagnostics
Ctrl+Shift+P → D365: Diagnose Settings
The D365 Deployer output panel shows the configuration state and PAC connection info.
Troubleshooting
| Problem | Solution |
|---|---|
pac not recognized |
Restart VS Code after installing PAC CLI |
| Authentication error | Run pac auth create and sign in again |
| Missing settings file | Fill in d365-deployment.settings.json at the project root |
pac pack failed |
Verify the solution and publisher exist in D365 |
pac import failed |
Check that the account has write permissions on the solution |
PluginDeploymentConfig.json not found |
Create the file at your solution root with prefix and packages |
"prefix" not set |
Fill in the prefix field in PluginDeploymentConfig.json |
dotnet not recognized |
Install the .NET SDK and restart VS Code |
pac plugin push failed |
The GUID in packageId does not match any Dataverse package — choose Create New Package to create one |
No .nupkg found after build |
Ensure the .csproj produces a NuGet package (<IsPackable>true</IsPackable>) |