-
Notifications
You must be signed in to change notification settings - Fork 2
Solutions
A Solution project lets you export a Dataverse solution to source control, unpack it
into individual components, and pack/import it again — the foundation of a healthy
Application Lifecycle Management (ALM)
workflow. Under the hood it uses the cross-platform
Power Platform CLI (pac)
(pac solution export/unpack/pack/import), so it runs on Windows, macOS, and Linux.

Steps: Prerequisites → Configure → Extract → Edit & commit → Pack → Deploy → CI/CD.
- The Power Platform CLI (
pac) installed (see Getting Started). - A connected environment. The extension creates a single named
pac authprofile (dataverse-powertools) from your connection for each operation. - New to solutions? Read Solution concepts first.
Solution settings live in spkl.json in the project root. This is now just a config
file — no external tool is involved (the name is kept for backward compatibility):
{
"solutions": [
{
"solution_uniquename": "MySolution",
"packagepath": "MySolution",
"packagetype": "both_unmanaged_import"
}
]
}| Field | Meaning |
|---|---|
solution_uniquename |
The unique name of the solution in Dataverse (not the display name). |
packagepath |
The folder the solution is unpacked into / packed from. |
packagetype |
Unmanaged, Managed, or Both. |
Tip: develop in unmanaged, ship managed.
Bothexports and unpacks the unmanaged and managed versions together, so you can source-control both. See managed vs unmanaged solutions.
Run Dataverse PowerTools: Extract Solution. This exports the solution from your
environment and unpacks it into packagepath, splitting it into per-component files —
ideal for source control and diffing.
Verify: packagepath fills with folders like Entities/, WebResources/,
Other/, and the output log shows the export completing.
Edit the unpacked component files (or make changes in the maker portal and re-extract),
then commit them to source control. Per-component files mean meaningful diffs and
reviewable pull requests, instead of an opaque .zip.
Run Dataverse PowerTools: Pack Solution to pack the unpacked folder back into a
solution .zip under bin/. This is a local operation — no connection required —
so it's what a CI pipeline runs to produce a release artifact.
Verify: a .zip appears under bin/.
Run Dataverse PowerTools: Deploy Solution to pack the folder and import it into your connected environment, publishing customizations. Use this to push local changes to a development environment.
Verify: the solution appears/updates in the target environment; the log shows the import completing.
For higher environments (test/prod), prefer importing a managed solution built by your pipeline rather than deploying unmanaged from a dev machine — see Healthy ALM.
Because packing and importing are plain pac commands with no editor dependency, reuse
the same packagepath folder in any pipeline (GitHub Actions, Azure DevOps, etc.) with
the Power Platform CLI
or the Power Platform Build Tools:
pac solution pack --zipfile out/MySolution.zip --folder MySolution --packagetype Managed
pac solution import --path out/MySolution.zip --environment https://target.crm.dynamics.com| Symptom | Fix |
|---|---|
No spkl.json found |
Make sure you initialised a Solution project; spkl.json must be in the workspace root. |
| Export/import fails to authenticate | Re-connect — see Refreshing a stale connection. |
| Wrong solution exported | Check solution_uniquename is the unique name (maker portal → Solutions → the value under "Name", not "Display name"). |
| Import succeeds but changes aren't visible | Customizations are published on import; if a specific component looks stale, re-extract and confirm it's in packagepath. |