Skip to Content

Mastering PCF Deployment: Managed vs Unmanaged Solutions, Publishing to CRM, and Setting Controls

A step-by-step guide to creating, packaging, and deploying Power Apps Component Framework (PCF) controls using Both Managed and Unmanaged solutions β€” the modern approach.
7 October 2025 by
Mastering PCF Deployment: Managed vs Unmanaged Solutions, Publishing to CRM, and Setting Controls
CloudVerve Technologies, Admin
| No comments yet

🧭 Introduction

When developing a Power Apps Component Framework (PCF) control, packaging it into a solution is a crucial step before deployment in Dynamics 365 CRM or Power Apps.

Solutions allow developers to bundle components like tables, forms, views, and PCF controls into a single deployable unit.

There are two main solution types:

  • Unmanaged Solution: Editable; used for development and testing.

  • Managed Solution: Locked; ideal for production deployment.

Traditionally, developers had to build each version separately using the <Managed> tag or MSBuild parameters β€” but now, there’s a simpler, unified way.


βš™οΈ Step 1: Create the Solution Folder

Start by creating your solution using the Power Platform CLI:

pac solution init --publisher-name CloudVerve --publisher-prefix cv

This creates a folder like:

PCFSolution/ β”œβ”€β”€ Other/ β”œβ”€β”€ src/ β”œβ”€β”€ PCFSolution.cdsproj └── Solution.xml

Then, link your PCF control to this solution:

pac solution add-reference --path ../MyPCFControl


🧩 Step 2: Enable Both Managed & Unmanaged Builds in .cdsproj

Now the magic part β€” instead of manually toggling <Managed> or running separate builds,

you can generate both solution packages (Managed & Unmanaged) in one single build by adding this property group to your .cdsproj file.

Open your solution project file:

PCFSolution\PCFSolution.cdsproj

Then add the following XML inside it:

<PropertyGroup> <SolutionPackageType>Both</SolutionPackageType> <SolutionPackageEnableLocalization>false</SolutionPackageEnableLocalization> </PropertyGroup>


🧠 What this does:

  • <SolutionPackageType>Both</SolutionPackageType> β†’ Creates both managed and unmanaged ZIPs automatically.

  • <SolutionPackageEnableLocalization>false</SolutionPackageEnableLocalization> β†’ Skips localization resources unless needed.


πŸ— Step 3: Build the Solution

Run the build command:

msbuild /t:rebuild

After build completes, you’ll get two separate ZIP files automatically:

bin\Debug\ β”œβ”€β”€ PCFSolution.zip ← Unmanaged Solution └── PCFSolution_managed.zip ← Managed Solution

βœ… No need to edit Solution.xml or run multiple builds β€” both versions are generated in one go.


πŸ“¦ Step 4: Import the Unmanaged Solution in Dynamics 365 CRM

Now that your Unmanaged ZIP is ready:

  1. Go to https://make.powerapps.com

  2. Choose your Environment

  3. Navigate to Solutions β†’ Import Solution

  4. Upload the PCFSolution.zip file

  5. Click Next β†’ Import

Once imported, your PCF control becomes available in your app’s environment.


🧱 Step 5: Set PCF Control on Field or Subgrid

After successful import, you can attach your PCF control to either a Field or Subgrid (Dataset).

πŸ”Ή For a Field Control

Used when your PCF interacts with a single field (like a rating, toggle, or progress bar).

Steps:

  1. Go to the Table β†’ Form Editor

  2. Select a field (e.g., Probability %)

  3. Click Change Control

  4. Choose your PCF Control (e.g., CloudVerve.ProgressBarControl)

  5. Configure parameters if any

  6. Save and Publish

πŸ”Ή For a Subgrid / Dataset Control

Used for displaying lists of records in custom layouts (like Kanban, calendar, or charts).

Steps:

  1. Open Form Editor β†’ Add a Subgrid

  2. Select your data source (table/view)

  3. Click the Subgrid β†’ Change Control

  4. Select your dataset PCF (e.g., CloudVerve.KanbanControl)

  5. Configure dataset properties

  6. Save and Publish

Your subgrid now shows a fully custom React-based layout instead of a static grid.


πŸš€ Step 6: Deploy Managed Solution to Production

Once testing is done in your development or sandbox environment:

  1. Use the Managed version (PCFSolution_managed.zip)

  2. Go to Solutions β†’ Import in your Production environment

  3. Upload the Managed ZIP

  4. Click Import

Managed solutions:

  • Are locked (can’t be edited directly)

  • Ideal for production

  • Support version-controlled upgrades


🧠 Quick Recap

StepActionCommand / FileOutput
1Create Solutionpac solution initSolution folder
2Add PCF Controlpac solution add-referenceLinks control
3Enable Both BuildsAdd <SolutionPackageType>Both</SolutionPackageType>Dual build config
4Buildmsbuild /t:rebuildManaged + Unmanaged ZIPs
5Import to DevPower Apps PortalDeploy Unmanaged
6Deploy to ProdPower Apps PortalDeploy Managed


🧰 Example Output Structure

PCFSolution/ β”œβ”€β”€ bin/ β”‚ └── Debug/ β”‚ β”œβ”€β”€ PCFSolution.zip (Unmanaged) β”‚ └── PCFSolution_managed.zip (Managed) β”œβ”€β”€ Other/ β”œβ”€β”€ src/ β”œβ”€β”€ PCFSolution.cdsproj └── Solution.xml


πŸ’Ό CloudVerve Technologies β€” Your Power Platform Experts

At CloudVerve Technologies, we help organizations streamline their Dynamics 365 and Power Platform solutions with:

  • βœ… Custom PCF Controls (Field + Dataset)

  • βœ… Solution Packaging Automation

  • βœ… Managed / Unmanaged Deployments

  • βœ… Environment Migration Strategy

Our Microsoft-certified experts ensure your deployment pipelines are fast, consistent, and production-ready.


🌐 Visit Us

CloudVerve Technologies

www.cloudverve.in

πŸ“ž Contact us today for a free consultation on building, packaging, and deploying your next Power Platform solution.

Sign in to leave a comment