Study guide
4.6 Packaging, Deploying & Consuming a PCF Component
Microsoft Power Platform Developer Associate PL-400
Track your progress as you read
Finished sections get a check mark.
1 Introduction, Exam Overview & Developer Toolchain
0.1 PL-400 Exam Facts 0.2 Audience Profile & Required Developer Skills 0.3 The Power Platform Developer Toolchain 0.4 Extension-Point Map & AI in the Developer Workflow
2 Create a Technical Design
1.1 Analyzing Technical Architecture and Choosing Out-of-the-Box vs. Custom Solutions 1.2 Designing Authentication, Authorization, and Security Architecture 1.3 Deciding Where Business Logic Runs and Choosing the Right Table Type 1.4 Designing Reusable Power Apps Components and Custom Connectors 1.5 Designing Dataverse Code Components, Automations, and Integrations
3 Build Power Platform Solutions
2.1 Managing Power Platform Environments for Development 2.2 Dataverse Security Roles for Code Components, Least Privilege & Troubleshooting Operational Security 2.3 Solutions, Managing Dependencies & Solution Layers 2.4 Environment Variables & Connection References 2.5 Power Platform Pipelines & CI/CD with Power Platform Build Tools
4 Implement Power Apps Improvements
3.1 Complex Power Fx Formulas and Functions 3.2 Building Reusable Canvas Component Libraries 3.3 Invoking Power Automate Cloud Flows from a Canvas App 3.4 Troubleshooting Canvas and Model-Driven Apps with Monitor and Browser Debugging Tools 3.5 Optimizing Canvas and Model-Driven App Performance
5 Extend the User Experience
4.1 The Client API Object Model & JavaScript Form Scripting 4.2 Event Handler Registration & Navigation to Custom Pages via the Client API 4.3 Client Scripting Against the Dataverse Web API; Command Bar & Buttons with Power Fx and JavaScript 4.4 PCF Fundamentals: The Component Manifest & Lifecycle Events 4.5 Implementing PCF Component Interfaces; Device, Utility & Web API Features 4.6 Packaging, Deploying & Consuming a PCF Component
6 Extend the Platform: Dataverse Plug-ins & Custom APIs
5.1 Plug-in Fundamentals & the Event Execution Pipeline Stages 5.2 Execution Context & Implementing Business Logic in Plug-ins 5.3 Pre/Post Images & Organization Service Operations in Plug-ins 5.4 Registering Plug-ins with the Plug-in Registration Tool & Optimizing Plug-in Performance 5.5 Custom API Messages & Plug-ins That Implement a Custom API 5.6 Configuring Dataverse Business Events
7 Extend the Platform: Custom Connectors
6.1 Open API Definitions: Building and Extending a Custom Connector 6.2 Authentication and Policy Templates for Custom Connectors 6.3 Importing Definitions and Creating Connectors for Azure Services 6.4 Azure Functions in Custom Connectors and Data Transformation
8 Extend the Platform: Platform APIs & Azure Functions
7.1 Dataverse Web API Operations & OAuth Authentication 7.2 Organization Service Operations, Concurrency, Transactions & Bulk Operations 7.3 Service Protection API Limits & Retry Policies 7.4 Azure Functions for Long-Running, Scheduled & Event-Driven Workloads 7.5 Authenticating to Power Platform with Managed Identities
9 Extend the Platform: Power Automate Cloud Flows
8.1 Dataverse connector triggers/actions, trigger filters & retry policies 8.2 Complex expressions & flow control with error handling 8.3 Sensitive input/output parameters & Azure Key Vault 8.4 Reusable child flows & Microsoft Entra ID service principals
10 Develop Integrations
9.1 Publishing Dataverse Events: IServiceEndpointNotificationService & the Plug-in Registration Tool 9.2 Registering Service Endpoints: Webhooks, Azure Service Bus & Event Hub 9.3 Data Synchronization with Change Tracking & Alternate Keys 9.4 Upsert-Based Synchronization with the UpsertRequest Message
11 Exam Readiness & Practice
10.1 Cross-Domain "Where Do I Implement This?" Decision Framework 10.2 Exam-Day Strategy, PL-400 Item Styles & Study Plan
4.6 Packaging, Deploying & Consuming a PCF Component
Key Takeaways Explain This Topic AI
npm start runs the local test harness for fast rendering iteration without a live environment; pac pcf push deploys straight into a connected dev environment for a solo developer's fast loop.
Real ALM packaging uses pac solution init, pac solution add-reference to link the component project, and an MSBuild/dotnet build to produce a solution zip for import.
Import unmanaged into dev and managed into test/UAT/production, following the same solution-layering discipline as any other component type.
A component must be explicitly applied to a specific field, view, or subgrid after import — importing the solution alone changes nothing visually.
Incrementing the manifest's <control version=...> attribute before rebuilding is required for Dataverse to recognize and apply an updated component.
Last updated: July 2026
Writing a working index.ts is only part of shipping a PCF component. Before an organization's makers can drop it onto a form or a view, the component has to move through a local test loop, get packaged into a proper Dataverse solution, and be applied to a specific field, view, or subgrid.
- Fast Local Iteration
- The quickest feedback loop, before touching any live environment, is the built-in test harness: npm start
This launches pcf-scripts start , which opens a browser-based harness that simulates a bound field or dataset without requiring a connected Dataverse environment. It's the right tool for iterating on rendering logic, styling, and basic interaction, but it cannot exercise environment-dependent behavior such as real context.webAPI calls against live data or security-role-based field behavior.
Quick Deploy to a Real Dev Environment
Once the component needs to be tested against real data or inside an actual form, pac pcf push deploys it directly into a connected development environment: pac pcf push --publisher-prefix contoso
This command builds an unmanaged solution containing the component behind the scenes and imports it automatically, which makes it ideal for a solo developer's fast iterate-and-test cycle. It is not , however, an ALM promotion mechanism — it's a shortcut for one developer's own dev environment, not a way to move a component through test, UAT, and production.
Packaging for Real ALM
Promoting a component through environments the way other solution components (tables, plug-ins, flows) are promoted requires packaging it into a proper Dataverse solution project:
pac solution init --publisher-name Contoso --publisher-prefix contoso — scaffolds a solution project.
pac solution add-reference --path <path-to-pcf-project> — links the component's project into the solution project so its build output becomes part of the solution package.
Build with MSBuild ( msbuild /t:build /restore , or the equivalent dotnet build for SDK-style projects) — restores NuGet dependencies and produces a solution .zip containing the compiled bundle, the manifest, and any resources. A Debug configuration build typically produces an unmanaged package for dev iteration; a Release configuration, when set up for it, produces a managed package suitable for downstream environments.
Import the resulting .zip through Solution Explorer in the maker portal, pac solution import , or a Power Platform Build Tools pipeline task — unmanaged into dev, managed into test, UAT, and production, following the same solution-layering discipline that governs every other component type.
Consuming the Component
Once imported, a component still has to be applied somewhere — importing the solution alone doesn't change any form's appearance:
Field components are added from the field's properties panel in the form or app designer, under its "Components" section; the developer configures which input/output properties map to which values and which form factors (web, phone, tablet) use the custom rendering versus the platform default.
Dataset components are applied the same way to a view or a subgrid, replacing the default grid renderer and binding to that view's or subgrid's columns.
Canvas apps can use the same component if code components are enabled for canvas apps at the environment level (an environment setting that must be turned on) and the component doesn't depend on model-driven-only behavior.
Each of these — a specific field, a specific view, a specific subgrid — is a separate configuration choice; applying a component to one field does not make it available anywhere else the same table appears without configuring it there too.
Versioning Matters
Dataverse identifies whether a rebuilt component is actually new by the <control version="..."> attribute in the manifest. If that version isn't incremented (or auto-incremented by tooling) before rebuilding and re-importing, the platform can fail to recognize the updated bundle as a change, leaving users looking at a cached, stale rendering even though the solution import reported success. Because PCF components are ordinary Dataverse solution components, they follow the same dependency-tracking, layering, and pipeline-based promotion practices covered in the Build Power Platform Solutions domain — there is no separate ALM story just for code components.
One Component, Multiple Placements
A single component definition can be applied to several places at once — the same rating control might be added to a field on the account form, a different field on the opportunity form, and a column inside a subgrid — and updating the underlying component in one place, through a new solution import, updates every placement that references it, without needing to reconfigure each usage individually. This many-to-one relationship (one component, many bindings) is why versioning discipline matters so much: a botched update to a widely reused component propagates its problem everywhere the component is applied the next time the solution is imported, rather than staying isolated to a single form.
Solution Checker
Before a component reaches a shared environment, running the Solution Checker against the packaged solution catches common code-quality and reliability issues — unhandled promise rejections, use of deprecated APIs, or accessibility problems in generated markup — the same automated review applied to plug-ins and other solution components. Treating Solution Checker as a required gate before promoting a component out of a development environment, rather than an optional linting pass, keeps issues from surfacing for the first time in test or production, where they are far more disruptive to diagnose and fix.