Create and build a custom component
[This topic is pre-release documentation and is subject to change.]
This topic provides information on how to create and deploy a custom component using PowerApps component framework.
Ensure that you have installed Microsoft PowerApps CLI
Create a new component
To get started, open a new Developer Command Prompt for VS 2017 after installing PowerApps CLI.
In the Developer Command Prompt for VS 2017, create a new folder on your local hard drive for example, C:\Users<your name>\Documents\My_PCF_Control
Go to the newly created folder using the command
cd <specify your new folder path>
Run the following command to create a new component project by passing some basic parameters:
pac pcf init --namespace <specify your namespace here> --name <put component name here> --template <component type>
Currently, we offer two types of components: field and dataset.
To retrieve all the required project dependencies, run the command
Open your project folder (
C:\Users\<your name>\Documents\My_PCF_Control\<component name>) in any developer environment of your choice and get started with your custom component development.
Build your component
To build your component you can open the folder in Visual Studio Code and use the (Ctrl-Shift-B) command, then select your build options. Alternately, you can build your component quickly using
npm run build command in your Developer Command Prompt for VS 2017 window.
To debug your component during or after the build operation, see Debug a custom component.
Known Configuration issues and Workarounds
Msbuild error MSB4036:
- The name of the task in the project file is the same as the name of the task class.
- The task class is public and implements the Microsoft.Build.Framework.ITask interface.
- The task is correctly declared with <UsingTask> in the project file or in the *.tasks files located in the
- Open Visual Studio Installer.
- For VS 2017, select Modify.
- Click on Individual Components.
- Under Code Tools, check NuGet targets & Build Tasks.
Debug custom components
Package a custom component
Add custom components to a field or entity
Updating existing custom components
PowerApps component framework API Reference
PowerApps component framework Overview