pac pcf

Commands for working with PowerApps component framework projects

Commands

Command Description
pac pcf init Initializes a directory with a new PowerApps component framework project
pac pcf push Import the PowerApps component framework project into the current Dataverse Organization
pac pcf version Patch version for controls

pac pcf init

Initializes a directory with a new PowerApps component framework project

Example

pac pcf init --namespace SampleNameSpace --name SampleComponent --template field

Required Parameters

--name -n

The name for the component

Note: Only characters within the ranges [A - Z], [a - z] or [0 - 9] are allowed. The first character may not be a number.

--namespace -ns

The namespace for the component

Note: Only characters within the ranges [A - Z], [a - z], [0 - 9], or '.' are allowed. The first and last character may not be the '.' character. Consecutive '.' characters are not allowed. Numbers are not allowed as the first character or immediately after a period.

--template -t

Choose a template for the component

Use one of these values:

  • field
  • dataset

Optional Parameters

--framework -fw

The rendering framework for control. Default value is 'none' [none: HTML, react: React]

Use one of these values:

  • none
  • react

--outputDirectory -o

Output directory

--run-npm-install -npm

Auto run 'npm install' after the control is created. Default value is 'true'

This parameter requires no value. It is a switch.

Remarks

Use --framework react with React controls & platform libraries (Preview).

pac pcf push

Import the PowerApps component framework project into the current Dataverse Organization

Example

pac pcf push --publisher-prefix dev

Required Parameters

--publisher-prefix -pp

Customization prefix value for the Dataverse solution publisher

Note: The prefix must be 2 to 8 characters long, can only consist of alpha-numerics, must start with a letter, and cannot start with 'mscrm'.

Optional Parameters

--force-import -f

Force a full update of the control

This parameter requires no value. It is a switch.

--verbosity -v

Verbosity level for MSBuild when building the temporary solution wrapper.

Use one of these values:

  • minimal
  • normal
  • detailed
  • diagnostic

pac pcf version

Patch version for controls

Example

pac pcf version --patchversion 1.0.0.0 --path c:\Users\Downloads\SampleComponent --allmanifests
pac pcf version --strategy gittags

Optional Parameters

--allmanifests -a

Updates patch version for all 'ControlManifest.xml' files

This parameter requires no value. It is a switch.

--filename -fn

Tracker CSV file name to be used when using filetracking as a strategy. Default value is ControlsStateVersionInfo.csv

--patchversion -pv

Patch version for controls

Note: The value must be a positive integer

--path -p

Absolute/Relative path of the 'ControlManifest.xml' for updating.

--strategy -s

Updates patch version for 'ControlManifest.xml' files using specified strategy. If using gittags, set personal access token in the following environment variable "PacCli.PAT"

Use one of these values:

  • gittags
  • filetracking
  • manifest

--updatetarget -ut

Specify which target manifest needs to be updated

Use one of these values:

  • build
  • project

Remarks

--patchversion will only take value of the third part of the version tuple: Major.Minor.Patch.

For --strategy the available values have these meanings:

Value Description
gittags Use Git tags to decide whether a particular component's patch version needs to be updated.
filetracking Use a .csv file to decide whether a particular component's patch version needs to be updated.
manifest Increments the patch version by 1 for all the components.

See also

Microsoft Power Platform CLI Command Groups
Microsoft Power Platform CLI overview