Manage solutions, patches, and ALM for Dynamics 365 deployments
✓Works with OpenClaudeYou are a Dynamics 365 solution architect managing application lifecycle management (ALM). The user wants to manage solutions, patches, and deployments across D365 environments using the Power Platform CLI and solution tools.
What to check first
- Run
pac --versionto verify Power Platform CLI is installed and up to date - Confirm you have administrative access to source and target D365 environments with valid authentication tokens
- Check that your solution XML files are in the correct folder structure:
<SolutionFolder>/Other/Solution.xml
Steps
- Authenticate to your D365 environment using
pac auth create --url https://<org>.crm.dynamics.comand select your credentials - List all solutions in the connected environment with
pac solution listto identify the solution unique name and version - Export the unmanaged solution using
pac solution export --path <output-folder> --name <solution-unique-name> --managed falseto extract customizations - Extract and inspect the solution XML with
pac solution unpack --zipfile <solution.zip> --outputfolder <unpacked-folder> --type unmanagedto review customizations, plugins, and workflows - Apply changes to individual XML files in the unpacked folder structure (customizations.xml, webresources, plugin assemblies) and commit to version control
- Repack the modified solution using
pac solution pack --zipfile <output.zip> --folder <unpacked-folder> --packagetype Bothto create both managed and unmanaged versions - Import the packed solution into the target environment with
pac solution import --path <solution.zip>and monitor for import warnings and conflicts - Publish all customizations in the target environment using
pac solution publishto activate changes - Create a patch version with
pac solution create-patch --solution <base-solution-name> --patchVersion <version-number>for incremental updates to existing solutions - Export patches and chain them together for dependent deployments to ensure correct installation order
Code
# D365 Solution Management Script
param(
[string]$EnvironmentUrl = "https://org.crm.dynamics.com",
[string]$SolutionName = "MySolution",
[string]$SolutionPath = "./Solutions",
[string]$Action = "export"
)
# Function to authenticate
function Connect-D365Environment {
param([string]$Url)
Write-Host "Authenticating to $Url..."
pac auth create --url $Url
}
# Function to export solution
function Export-D365Solution {
param([string]$Name, [string]$OutputPath, [bool]$Managed = $false)
$managedFlag = if ($Managed) { "true" } else { "false" }
Write-Host "Exporting solution: $Name (Managed: $Managed)"
pac solution export --path $OutputPath --name $Name --managed $managedFlag
}
# Function to unpack solution
function
Note: this example was truncated in the source. See the GitHub repo for the latest full version.
Common Pitfalls
- Treating this skill as a one-shot solution — most workflows need iteration and verification
- Skipping the verification steps — you don't know it worked until you measure
- Applying this skill without understanding the underlying problem — read the related docs first
When NOT to Use This Skill
- When a simpler manual approach would take less than 10 minutes
- On critical production systems without testing in staging first
- When you don't have permission or authorization to make these changes
How to Verify It Worked
- Run the verification steps documented above
- Compare the output against your expected baseline
- Check logs for any warnings or errors — silent failures are the worst kind
Production Considerations
- Test in staging before deploying to production
- Have a rollback plan — every change should be reversible
- Monitor the affected systems for at least 24 hours after the change
Related Dynamics 365 Skills
Other Claude Code skills in the same category — free to download.
Dynamics 365 Plugin
Build C# plugins with pre/post operation steps and execution pipeline
D365 Power Automate
Create Power Automate flows for Dynamics 365 automation
D365 Model-Driven App
Build model-driven apps with forms, views, and business rules
D365 Web Resources
Create JavaScript web resources for form customization
D365 FetchXML
Write FetchXML queries for advanced data retrieval and reporting
D365 Business Central
Develop AL extensions for Dynamics 365 Business Central
D365 Finance & Operations
Develop X++ customizations for Dynamics 365 Finance & Operations
D365 PCF Control
Build Power Apps Component Framework custom controls
Want a Dynamics 365 skill personalized to YOUR project?
This is a generic skill that works for everyone. Our AI can generate one tailored to your exact tech stack, naming conventions, folder structure, and coding patterns — with 3x more detail.