Zum Inhalt springen

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. Oktober 2025 durch
Mastering PCF Deployment: Managed vs Unmanaged Solutions, Publishing to CRM, and Setting Controls
CloudVerve Technologies, Admin

🧭 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.