pac package

Commands for working with Dataverse package projects

Commands

Command Description
pac package add-external-package Adds an external package to a PD Package project
pac package add-reference Adds reference to Dataverse solution project
pac package add-solution Adds a prebuilt Dataverse solution file to a PD Package project
pac package deploy Deploys package to Dataverse environment
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 an external package to a PD Package project

Required Parameters

--package-type -t

The type of the package being added. e.g. 'xpp' for FnO packages.

--path -p

Path to the external package

Optional Parameters

--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 does not exist or appears to be invalid. Note, this will not affect any validation that is performed by MSBuild.

This parameter requires no value. It is a switch.

pac package add-reference

Adds reference to Dataverse solution project

Example

pac package add-reference --path c:\Users\Downloads\SampleSolution

Required Parameters

--path -p

The path to the referenced Dataverse solution project

Optional Parameters

--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 the minVersion and maxVersion is 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:

  • sync
  • async

--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.

--layer-order-behavior

This argument is applicable only for 1st party solutions.

Use one of these values:

  • above
  • base
  • below

--layer-order-solution-unique-names

This argument is applicable only for 1st party solutions.

Note: Use a semicolon delimited list of solution uniquenames.

--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:

  • skip
  • fault

--overwrite-unmanaged-customizations

Explicitly indicates whether to overwrite unmanaged customizations when this solution is imported.

Use one of these values:

  • true
  • false

--publish-workflows-activate-plugins

Explicitly indicates whether to publish the workflows and activate plugins when this solution is imported.

Use one of these values:

  • true
  • false

pac package add-solution

Adds a prebuilt Dataverse solution file to a PD Package project

Required Parameters

--path -p

Path to the Dataverse solution file (must be *.zip)

Optional Parameters

--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 the minVersion and maxVersion is 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:

  • sync
  • async

--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.

--layer-order-behavior

This argument is applicable only for 1st party solutions.

Use one of these values:

  • above
  • base
  • below

--layer-order-solution-unique-names

This argument is applicable only for 1st party solutions.

Note: Use a semicolon delimited list of solution uniquenames.

--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:

  • skip
  • fault

--overwrite-unmanaged-customizations

Explicitly indicates whether to overwrite unmanaged customizations when this solution is imported.

Use one of these values:

  • true
  • false

--publish-workflows-activate-plugins

Explicitly indicates whether to publish the workflows and activate plugins when this solution is imported.

Use one of these values:

  • true
  • false

--skip-validation -sv

Adds the item to the project file even if the file does not exist or appears to be invalid. Note, this will not affect any validation that is performed by MSBuild.

This parameter requires no value. It is a switch.

pac package deploy

Deploys package to Dataverse environment

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

Required Parameters

--package -p

path to a package dll or zip file with a package

Optional Parameters

--logConsole -c

Output log to console

This parameter requires no value. It is a switch.

--logFile -lf

Log file path

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

--include-PkgAssets-Content

Indicates whether to also include some sample files for the PkgAssets/Content folder.

This parameter requires no value. It is a switch.

--outputDirectory -o

Output directory

--package-name

Sets the default name of the package. Applies to the generation of ImportExtension.GetNameOfImport.

--template

The name of the template to instantiate. Note: the template 'legacy' will be removed in a future release.

Use one of these values:

  • sdk-style
  • legacy

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

--package -p

path to a package dll or zip file with a package

See also

Microsoft Power Platform CLI Command Groups
Microsoft Power Platform CLI overview