Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Commands for working with Dataverse package projects.
Commands
| Command | Description |
|---|---|
| pac package add-external-package | Adds a package that is external to the Dataverse solution system to a Package Deployer Package project. |
| pac package add-reference | Adds reference to Dataverse solution project |
| pac package add-solution | Adds a prebuilt Dataverse solution file to a Package Deployer Package project. |
| pac package compile | (Preview) Compiles a package. With --package-type erp, compiles X++ models using xppc.exe from the installed SDK and produces a deployable ZIP per model. |
| pac package db-sync | (Preview) Synchronizes the Finance and Operations application database with Dataverse. |
| pac package deploy | Deploys package to Dataverse |
| pac package init | Initializes a directory with a new Dataverse package project |
| pac package show | Shows details of Dataverse package |
pac package add-external-package
Adds a package that is external to the Dataverse solution system to a Package Deployer Package project.
Required Parameters for package add-external-package
--package-type -t
The type of the package being added. For example: 'xpp' for FnO packages.
--path -p
Path to the external package
Optional Parameters for package add-external-package
--import-order
A whole number that indicates the order to insert this item into the final ImportConfig.xml file at build time. Negative numbers are inserted before existing elements. Positive numbers are added after existing elements.
--skip-validation -sv
Adds the item to the project file even if the file doesn't exist or appears to be invalid. Note: Using this doesn't affect any validation performed by MSBuild.
This parameter requires no value. It's a switch.
pac package add-reference
Adds reference to Dataverse solution project
Example
pac package add-reference --path c:\Users\Downloads\SampleSolution
Required Parameters for package add-reference
--path -p
The path to the referenced Dataverse solution project
Optional Parameters for package add-reference
--dependency-overrides
A semicolon delimited list of overrides. This value overrides any dependency information encoded in the solution's metadata. Each override should be in the format: <uniquename>:<minVersion>:<maxVersion>. Where minVersion and maxVersion are optional but should be in .NET version format syntax.
Note: Use a semicolon delimited list of dependency overrides of the format <uniquename>:<minVersion>:<maxVersion>.
--import-mode
Explicitly specifies the required mode when importing this solution.
Use one of these values:
syncasync
--import-order
A whole number that indicates the order to insert this item into the final ImportConfig.xml file at build time. Negative numbers are inserted before existing elements. Positive numbers are added after existing elements.
--missing-dependency-behavior
Specifies the behavior on import when a dependency of this solution is missing from the target environment.
Use one of these values:
skipfault
--overwrite-unmanaged-customizations
Explicitly indicates whether to overwrite unmanaged customizations when this solution is imported.
Use one of these values:
truefalse
--publish-workflows-activate-plugins
Explicitly indicates whether to publish the workflows and activate plug-ins when this solution is imported.
Use one of these values:
truefalse
pac package add-solution
Adds a prebuilt Dataverse solution file to a Package Deployer Package project.
Required Parameters for package add-solution
--path -p
Path to the Dataverse solution file. The file must be a compressed ZIP file.
Optional Parameters for package add-solution
--dependency-overrides
A semicolon delimited list of overrides. This value overrides any dependency information encoded in the solution's metadata. Each override should be in the format: <uniquename>:<minVersion>:<maxVersion>. Where minVersion and maxVersion are optional but should be in .NET version format syntax.
Note: Use a semicolon delimited list of dependency overrides of the format <uniquename>:<minVersion>:<maxVersion>.
--import-mode
Explicitly specifies the required mode when importing this solution.
Use one of these values:
syncasync
--import-order
A whole number that indicates the order to insert this item into the final ImportConfig.xml file at build time. Negative numbers are inserted before existing elements. Positive numbers are added after existing elements.
--missing-dependency-behavior
Specifies the behavior on import when a dependency of this solution is missing from the target environment.
Use one of these values:
skipfault
--overwrite-unmanaged-customizations
Explicitly indicates whether to overwrite unmanaged customizations when this solution is imported.
Use one of these values:
truefalse
--publish-workflows-activate-plugins
Explicitly indicates whether to publish the workflows and activate plug-ins when this solution is imported.
Use one of these values:
truefalse
--skip-validation -sv
Adds the item to the project file even if the file doesn't exist or appears to be invalid. Note: Using this doesn't affect any validation performed by MSBuild.
This parameter requires no value. It's a switch.
pac package compile
(Preview) Compiles a package. With --package-type erp, compiles X++ models using xppc.exe from the installed SDK and produces a deployable ZIP per model.
Required Parameters for package compile
--package-type -pt
Target platform for deployment. Allowed values: dataverse, erp (Preview). Default: dataverse.
Optional Parameters for package compile
--app-version -av
Four-part F&O application version of the SDK to compile against (e.g. 10.0.2588.0). When omitted, the SDK registered for the active environment is used.
--incremental
Compile only changed artifacts (passes -incremental to xppc).
This parameter requires no value. It's a switch.
--language -lang
Comma-separated list of locales to compile labels for (e.g. en-US or en-US,fr,de). When omitted, LabelC builds every locale found in the source — matches Visual Studio's default Build Models behavior. Only affects the labels stage; xppc + best-practices + package run once over the combined output.
--license-file -lf
Path to an ISV license file to inject into each produced model ZIP. Written to <Model>/bin/<filename> inside the ZIP.
--model -m
Model name(s) to compile. Accepts a single name or comma-separated list. When omitted, all models listed in .erp/xpp.json are compiled.
--output
Directory where the deployable ZIPs will be written. Default: <repoRoot>/bin.
--outputDirectory -o
Output directory
--skip-bp
Skip the best-practices check step. By default the compile pipeline runs labels -> X++ -> best-practices.
This parameter requires no value. It's a switch.
--solution-root -sr
Root folder of the X++ solution (contains .erp/xpp.json). Defaults to the current directory.
pac package db-sync
(Preview) Synchronizes the Finance and Operations application database with Dataverse.
Optional Parameters for package db-sync
--argument-file -af
(Preview) Path to a JSON file matching the IncrementalSyncParameters (or ModuleSyncParameters) contract. Required for --db-sync Incremental.
--db-sync -ds
Database synchronization mode. Allowed values: Full, Module, Incremental. Default: Full.
--environment -env
Specifies the target Dataverse. The value may be a Guid or absolute https URL. When not specified, the active organization selected for the current auth profile will be used.
--modules -m
(Preview) Comma-separated list of module names to synchronize. Required when --db-sync is Module.
pac package deploy
Deploys package to Dataverse
Note
This command is only available for the .NET Full Framework version of the PAC CLI.
Example
pac package deploy --logFile c:\samplelogdata --package c:\samplepackage
Optional Parameters for package deploy
--argument-file -af
(Preview) Path to a JSON file matching the IncrementalSyncParameters (or ModuleSyncParameters) contract. Required for --db-sync Incremental.
--build-type -bt
(Preview) How the package is applied. Allowed values: Full, Incremental, Delete. Default: Full. Used with --package-type erp.
--db-sync -ds
(Preview) Database synchronization mode to run after deploy. Allowed values: None, Full, Module, Incremental. Default: None. Used with --package-type erp.
--environment -env
Specifies the target Dataverse. The value may be a Guid or absolute https URL. When not specified, the active organization selected for the current auth profile will be used.
--logConsole -c
Output log to console
This parameter requires no value. It's a switch.
--logFile -lf
Log file path
--modules -m
(Preview) Comma-separated list of module names to synchronize. Required when --db-sync is Module.
--outputDirectory -o
(Preview) Solution-mode only: root folder containing .erp/xpp.json. Defaults to the current directory. When --package is omitted under --package-type erp, all models listed in .erp/xpp.json are deployed in dependency order.
--package -p
Path to a package dll or zip file with a package.
--package-type -pt
Target platform for deployment. Allowed values: dataverse, erp (Preview). Default: dataverse.
--release-type -rt
(Preview) Package classification. Allowed values: Dev, Release. Default: Dev. Release packages force a full database sync on the server. Used with --package-type erp.
--settings -s
Runtime Package Settings that are passed to the package that is being deployed. The format of the string must be key=value|key=value.
Note: The format of the string must be key=value|key=value.
--solution -sz
Path to the Dataverse solution file. The file must be a compressed ZIP or CAB file.
--solution-root -sr
(Preview) Solution-mode only: root folder containing .erp/xpp.json. Defaults to the current directory. When --package is omitted under --package-type erp, all models listed in .erp/xpp.json are deployed in dependency order.
--verbose -vdbg
Emit verbose logs to the log outputs.
This parameter requires no value. It's a switch.
Remarks
You can use both logFile and logConsole parameters together, or use one parameter or the other.
pac package init
Initializes a directory with a new Dataverse package project
Example
pac package init --outputdirectory c:\samplepackage
Optional Parameters for package init
--layer -l
(Preview) X++ layer. Allowed values: USR, CUS, VAR, SL1, SL2, SL3, BUS, HFX, GLS, DIS, ISV. Default: ISV.
--model -m
(Preview) Name(s) of the X++ model(s) to scaffold. Accepts a single name or a comma-separated list (e.g. ModelA,ModelB). Required when --package-type is erp.
--outputDirectory -o
Output directory
--package-name
Sets the default name of the package. Applies to the generation of ImportExtension.GetNameOfImport.
--package-type -pt
Type of package project to scaffold. Allowed values: dataverse, erp (Preview). Default: dataverse.
--publisher -pub
(Preview) Publisher name written into the model descriptor. Default: Microsoft.
--source-root -sr
(Preview) Source root path (relative to output directory) where models will live. Default: ./src.
pac package show
Shows details of Dataverse package
Note
This command is only available for the .NET Full Framework version of the PAC CLI.
Example
pac package show c:\samplepackage.dll
Required Parameters for package show
--package -p
Path to a package dll or zip file with a package.
Optional Parameters for package show
--environment -env
Specifies the target Dataverse. The value may be a Guid or absolute https URL. When not specified, the active organization selected for the current auth profile will be used.
--logFile -lf
Log file path
--verbose -vdbg
Emit verbose logs to the log outputs.
This parameter requires no value. It's a switch.
See also
Microsoft Power Platform CLI Command Groups
Microsoft Power Platform CLI overview