Skip to content

Commit 3880164

Browse files
committed
Fixes all around
1 parent f8e4fb0 commit 3880164

File tree

4 files changed

+102
-116
lines changed

4 files changed

+102
-116
lines changed

powerapps-docs/developer/component-framework/create-custom-controls-using-pcf.md

Lines changed: 42 additions & 108 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: Create custom component using PowerApp Component Framework Tooling| Microsoft Docs
2+
title: Create and deploy a component| Microsoft Docs
33
description: Start creating a component using the PowerApps component framework Tooling
44
keywords: PowerApps component framework, Custom components, Component Framework
55
ms.author: nabuthuk
@@ -12,141 +12,75 @@ ms.topic: "article"
1212
ms.assetid: d2cbf58a-9112-45c2-b823-2c07a310714c
1313
---
1414

15-
# Create, debug and deploy a component using Microsoft PowerApps CLI
15+
# Create and deploy a component
1616

1717
[!INCLUDE[cc-beta-prerelease-disclaimer](../../includes/cc-beta-prerelease-disclaimer.md)]
1818

19-
Use PowerApps Command Line Interface (CLI) to create, debug and deploy custom PowerApps component framework components. PowerApps CLI will enable developers to quickly create PowerApps component framework components and will in the future be expanded to include support for additional development and Application Lifecycle Management (ALM) experiences.
19+
This topic provides information on how to create and deploy a custom component using PowerApps component framework.
2020

21-
## What is Microsoft PowerApps CLI?
21+
Ensure that you have installed Microsoft PowerApps CLI
2222

23-
Microsoft PowerApps CLI is a simple, single-stop developer command line interface enabling you to create custom component. PowerApps CLI is also the first step towards a comprehensive ALM story where enterprise developers and ISVs can create, build, debug and publish their PowerApps and Dynamics 365 for Customer Engagement apps extensions and customizations quickly and efficiently.
24-
25-
> [!IMPORTANT]
26-
> - Microsoft PowerApps CLI tools are a pre-release version and may be different from the commercially released version.
27-
> - [!INCLUDE[cc_preview_features_definition](../../includes/cc-preview-features-definition.md)]
28-
> - If you give feedback about the software to Microsoft, you give to Microsoft, without charge, the right to use, share and commercialize your feedback in any way and for any purpose.
29-
> - Microsoft doesn't provide support for this preview feature. Microsoft Technical Support won’t be able to help you with issues or questions.
30-
31-
## Prerequisites to use PowerApps CLI
32-
33-
To use PowerApps CLI you will need the following:
34-
35-
- Install [Npm](https://www.npmjs.com/get-npm)(comes with Node.js) or install [Node.js](https://nodejs.org/en/) (comes with npm). We recommend LTS (Long Term Support) version 10.15.3 LTS as it seems to be most stable.
36-
- If you don’t already have Visual Studio 2017 or later, follow one of the options below:
37-
- Option 1: Install Visual Studio 2017 or later
38-
- Option 2: Install .NET Core 2.2 SDK and install Visual Studio Code
39-
- Install Microsoft PowerApps CLI from [here](http://download.microsoft.com/download/D/B/E/DBE69906-B4DA-471C-8960-092AB955C681/powerapps-cli-0.1.51.msi)
40-
41-
42-
43-
> [!NOTE]
44-
> To deploy your custom component, you will need Common Data Service environment with System administrator or System customizer privileges.
45-
46-
> [!NOTE]
47-
> Currently PowerApps CLI is supported only on Windows 10.
48-
49-
## Creating a new PowerApps component framework component
23+
## Create a new component
5024

5125
To get started, open a new Developer Command Prompt for VS 2017 after installing PowerApps CLI.
5226

5327
1. 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*
5428
2. Go to the newly created folder using the command `cd <specify your new folder path>`
55-
3. Run the following command to create a new component project by passing some basic parameters
56-
`pac pcf init --namespace <specify your namespace here> --name <put component name here> --template <component type>`
29+
3. Run the following command to create a new component project by passing some basic parameters:
30+
31+
`pac pcf init --namespace <specify your namespace here> --name <put component name here> --template <component type>`
5732

5833
> [!NOTE]
59-
> Today we offer two types of components **field** and **dataset**.
34+
> Currently, we offer two types of components: **field** and **dataset**.
6035
6136
4. To retrieve all the required project dependencies, run the command `npm install`.
6237
5. 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.
6338

64-
## Building your components
39+
## Build your component
6540

6641
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 control quickly using `npm run build` command in your Developer Command Prompt for VS 2017 window.
6742

68-
## Debugging your PowerApps component framework component
69-
70-
Once you are done implementing your custom component logic, run the following command to start the debugging process
71-
`npm start`
72-
73-
> [!NOTE]
74-
> Today you can only visualize your field component, but dataset support is coming soon. Below image shows a sample component implemented in the tutorial below just as an example.
75-
76-
> [!div class="mx-imgBorder"]
77-
> ![local-host](media/local-host.png "local host")
78-
79-
As shown in the image above, the browse window will open with 3 sections. Your component will be rendered in the left pane while the right pane consists of **Inputs** and **Outputs** sections
43+
> [!TIP]
44+
> To debug your component during or after the build operation, see [Debug custom components](debugging-custom-controls.md).
8045
81-
- **Inputs** section is an interactive UI that displays all properties and their types/type-groups defined in the manifest.xml. It allows you to key in mock data for each property.
82-
- **Outputs** section renders the output whenever a component's `getOutputs` method gets called. 
83-
84-
> [!NOTE]
85-
> If you want to modify the `manifest.xml` or create additional properties, you will need to restart the debug process before they appear in the inputs section.
86-
87-
As you are inputting mock data, you can use the browser’s debugging capabilities to observe the component behavior. Each browser provides you with a debugging tool to help you debug your code natively in the browser. Typically, you can activate debugging in your browser by pressing the **F12** key to display the native developer tool used for debugging. Today both Chrome and Edge browsers are supported.
88-
89-
For example, on **Microsoft Edge**,
90-
91-
- Press **F12** to open inspector.
92-
- Click on your component
93-
- On top bar, go to **Debugger**, and then start searching for the component name described in the Manifest file in the search bar. For example, type your component name like `Hello World component`.
94-
95-
> [!div class="mx-imgBorder"]
96-
> ![debug-component](media/debug-control.png "Debug component")
97-
98-
> [!NOTE]
99-
> It is always a good practice to set breakpoints on the component's life cycle methods like `init` and `updateView`
100-
101-
You can also interact with the component locally in real time and observe elements in the DOM by setting a breakpoint in the sources tab as follows:
46+
## Deploy your component
10247

103-
> [!div class="mx-imgBorder"]
104-
> ![local-host](media/local-host.png "local host")
48+
Once you have built your component, you must deploy it to be used.
10549

106-
> [!div class="mx-imgBorder"]
107-
> ![debug-component](media/debug-control-1.png "Debug component 1")
50+
Follow the steps below to create and import a [solution](/powerapps/maker/common-data-service/solutions-overview) file:
10851

52+
1. Create a new directory and go to it:
10953

110-
> [!NOTE]
111-
> You can also use the following steps to perform outer loop debugging using fiddler.
112-
> 1. Install [Fiddler](https://www.telerik.com/download/fiddler)
113-
> 2. Follow the steps to configure [AutoResponder](https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/streamline-javascript-development-fiddler-autoresponder)
54+
`cd <new directory name>`
55+
1. Create a new solution project in the directory of your choice by using the command:
11456

115-
## Deploying your components
116-
117-
Once the debugging and development is finished, you just have one step remaining to deploy your new component.
118-
119-
Follow the steps below to create and import a [solution](https://docs.microsoft.com/en-us/dynamics365/customer-engagement/customize/solutions-overview) file:
120-
121-
1. Create a new directory and go to it `cd <new directory name>`
122-
2. Create a new solution project in the directory of your choice by using the command
123-
`pac solution init --publisherName <enter your publisher name> --customizationPrefix <enter your publisher name>` after `cd <your new folder>`.
57+
`pac solution init --publisherName <enter your publisher name> --customizationPrefix <enter your publisher name>` after `cd <your new folder>`.
12458

12559
> [!NOTE]
12660
> The [publisherName](https://docs.microsoft.com/en-us/powerapps/developer/common-data-service/reference/entities/publisher) and [cutomizationPrefix](https://docs.microsoft.com/en-us/powerapps/maker/common-data-service/change-solution-publisher-prefix) values must be unique to your environment.
12761
128-
3. Once the new solution project is created, you need to refer to the ___location where the created component is located. You can add the reference by using the command
129-
`pac solution add-reference --path <path or relative path of your PowerApps component framework project on disk>`
130-
4. To generate a zip file from your solution project, you will need to `cd` into your solution project directory and build the project using the command `msbuild /t:restore` then `msbuild`
62+
3. Once the new solution project is created, you need to refer to the ___location where the created component is located. You can add the reference by using the following command:
13163

132-
> [!NOTE]
133-
> If msbuild 15 is not in the path, open Developer Command Prompt for Vs 2017 to run the `msbuild` commands.
64+
`pac solution add-reference --path <path or relative path of your PowerApps component framework project on disk>`
65+
66+
4. To generate a zip file from your solution project, you will need to `cd` into your solution project directory and build the project using the following command:
67+
68+
`msbuild /t:restore` then `msbuild`
13469

13570
> [!NOTE]
136-
> Building the solution in the debug configuration, generates an unmanaged solution package. A managed solution package is generated by building the solution in release configuration. These settings can be overridden by specifying SolutionPackageType property in `cdsproj` file.
71+
> - If msbuild 15 is not in the path, open Developer Command Prompt for VS 2017 to run the `msbuild` commands.
72+
> - Building the solution in the debug configuration, generates an unmanaged solution package. A managed solution package is generated by building the solution in release configuration. These settings can be overridden by specifying SolutionPackageType property in `cdsproj` file.
13773
138-
> [!NOTE]
139-
> If you would like your project build to emit a managed solution or both managed and unmanaged, open the folder where you created your solution project, edit the `cdsproj` file and uncomment the below property group:
140-
```XML
141-
<PropertyGroup>
142-
<SolutionPackageType>Managed</SolutionPackageType>
143-
</PropertyGroup>
144-
```
74+
If you would like your project build to emit a managed solution or both managed and unmanaged, open the folder where you created your solution project, edit the `cdsproj` file and uncomment the below property group:
75+
```XML
76+
<PropertyGroup>
77+
<SolutionPackageType>Managed</SolutionPackageType>
78+
</PropertyGroup>
79+
```
14580

146-
> [!NOTE]
147-
> You can also enable additional solution packaging [capabilities](https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/compress-extract-solution-file-solutionpackager) by adding any of the property group elements below:
81+
You can also enable additional solution packaging [capabilities](/powerapps/developer/common-data-service/compress-extract-solution-file-solutionpackager) by adding any of the property group elements below:
14882

149-
```XML
83+
```XML
15084
<PropertyGroup>
15185
<SolutionPackageErrorLevel />
15286
<SolutionPackageEnableLocalization />
@@ -155,10 +89,9 @@ Follow the steps below to create and import a [solution](https://docs.microsoft.
15589
<SolutionPackageZipFilePath />
15690
<SolutionPackageMapFilePath />
15791
</PropertyGroup>
158-
```
92+
```
15993

160-
5. The generated solution zip file is located in `\bin\debug\`.
161-
6. You should manually [import the solution](https://docs.microsoft.com/en-us/dynamics365/customer-engagement/customize/import-update-export-solutions) using the web portal once the zip file is ready.
94+
5. The generated solution zip file is located in `\bin\debug\`. You must manually [import the solution](https://docs.microsoft.com/en-us/dynamics365/customer-engagement/customize/import-update-export-solutions) using the web portal once the zip file is ready.
16295

16396
## Adding custom components to an entity or a field
16497

@@ -192,13 +125,14 @@ To uninstall the CLI tool please run the MSI from [here](http://download.microso
192125

193126
**Resolution:**
194127

195-
1. Open Visual Studio Installer
196-
1. For VS 2017, click on modify
197-
1. Click on Individual Components
198-
1. Under Code Tools, check **NuGet targets & Build Tasks**
128+
1. Open Visual Studio Installer.
129+
1. For VS 2017, select **Modify**.
130+
1. Click on Individual Components.
131+
1. Under Code Tools, check **NuGet targets & Build Tasks**.
199132

200133
### See also
201134

135+
[Debug custom components](debugging-custom-controls.md)
202136
[Implementing components in TypeScript](implementing-controls-using-typescript.md)<br/>
203137
[Updating existing components into new tools format](updating-existing-controls.md)<br/>
204138
[PowerApps component framework API Reference](reference/index.md)<br/>

powerapps-docs/developer/component-framework/debugging-custom-controls.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
---
2-
title: "Debugging Custom Components | MicrosoftDocs"
2+
title: "Debug Custom Components | MicrosoftDocs"
33
description: "How to debug a custom control using Fiddler and Native debugging"
44
manager: kvivek
55
ms.date: 04/23/2019
66
ms.service: "powerapps"
7-
ms.topic: "index-page"
7+
ms.topic: "article"
88
ms.assetid: 18e88d702-3349-4022-a7d8-a9adf52cd34f
99
ms.author: "nabuthuk"
1010
---
11-
# Debugging csutom components
11+
# Debug custom components
1212

1313
Once you are done implementing your custom control logic, run the following command to start the debugging process
1414
`npm start`
1515

1616
> [!NOTE]
17-
> Today you can only visualize your field control, but dataset support is coming soon.
17+
> Currently, you can only visualize your field control, but dataset support is coming soon.
1818
1919
> [!div class="mx-imgBorder"]
2020
> ![local-host](media/local-host.png "local host")
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
---
2+
title: Microsoft PowerApps Command Line Interface (CLI)| Microsoft Docs
3+
description: "Get the Microsoft PowerApps Command Line Interface (CLI) to create, debug and deploy custom components using PowerApps component framework."
4+
keywords: PowerApps component framework, Custom components, Component Framework
5+
ms.author: nabuthuk
6+
manager: kvivek
7+
ms.date: 04/23/2019
8+
ms.service: "powerapps"
9+
ms.suite: ""
10+
ms.tgt_pltfrm: ""
11+
ms.topic: "article"
12+
ms.assetid: f393f227-7a88-4f25-9036-780b3bf14070
13+
---
14+
15+
# Get Microsoft PowerApps Command Line Interface (CLI)
16+
17+
[!INCLUDE[cc-beta-prerelease-disclaimer](../../includes/cc-beta-prerelease-disclaimer.md)]
18+
19+
Use Microsoft PowerApps Command Line Interface (CLI) to create, debug and deploy custom components using PowerApps component framework. PowerApps CLI enables developers to quickly create PowerApps component framework components and will in the future be expanded to include support for additional development and Application Lifecycle Management (ALM) experiences.
20+
21+
## What is Microsoft PowerApps CLI?
22+
23+
Microsoft PowerApps CLI is a simple, single-stop developer command line interface enabling you to create custom component. PowerApps CLI is also the first step towards a comprehensive ALM story where enterprise developers and ISVs can create, build, debug and publish their PowerApps and Dynamics 365 for Customer Engagement apps extensions and customizations quickly and efficiently.
24+
25+
> [!IMPORTANT]
26+
> - Microsoft PowerApps CLI tools are a pre-release version and may be different from the commercially released version.
27+
> - [!INCLUDE[cc_preview_features_definition](../../includes/cc-preview-features-definition.md)]
28+
> - If you give feedback about the software to Microsoft, you give to Microsoft, without charge, the right to use, share and commercialize your feedback in any way and for any purpose.
29+
> - Microsoft doesn't provide support for this preview feature. Microsoft Technical Support won’t be able to help you with issues or questions.
30+
31+
## Get Microsoft PowerApps CLI
32+
33+
To use Microsoft PowerApps CLI, do the following:
34+
35+
1. Install [Npm](https://www.npmjs.com/get-npm) (comes with Node.js) or install [Node.js](https://nodejs.org/en/) (comes with npm). We recommend LTS (Long Term Support) version 10.15.3 LTS as it seems to be most stable.
36+
37+
1. If you don’t already have Visual Studio 2017 or later, follow one of the options below:
38+
- Option 1: Install Visual Studio 2017 or later
39+
- Option 2: Install .NET Core 2.2 SDK and install Visual Studio Code
40+
41+
1. Install Microsoft PowerApps CLI from [here](http://download.microsoft.com/download/D/B/E/DBE69906-B4DA-471C-8960-092AB955C681/powerapps-cli-0.1.51.msi)
42+
43+
44+
45+
> [!NOTE]
46+
> - To deploy your custom component using PowerApps CLI, you must have a Common Data Service environment with system administrator or system customizer privileges.
47+
> - Currently, PowerApps CLI is supported only on Windows 10.
48+
49+
### See also
50+
51+
[Implementing components in TypeScript](implementing-controls-using-typescript.md)<br/>
52+

powerapps-docs/developer/component-framework/toc.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
href: overview.md
55
- name: "What are custom components"
66
href: custom-controls-overview.md
7-
- name: Get the tooling
8-
href: powerapps-cli.md
7+
- name: Get PowerApps CLI
8+
href: get-powerapps-cli.md
99
- name: Tutorial
1010
items:
1111
- name: Implement sample component
@@ -28,8 +28,8 @@
2828
href: updating-existing-controls.md
2929
- name: Publish custom components on AppSource
3030
href: publish-components-on-app-source.md
31-
- name: Limitations
32-
href: limitations.md
31+
- name: Limitations
32+
href: limitations.md
3333
- name: FAQ
3434
href: faq.md
3535
- name: Sample components

0 commit comments

Comments
 (0)