Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Power Apps Pro Dev & ISV
Answered

PCF - How to move the control to other enviroments?

(0) ShareShare
ReportReport
Posted on by 49

Hi all,

 
I have created a pcf component for a canvas app. The app is already a part of an existing solution with other components (flows, dataverse tables etc.).
I am using pac pcf push for deploying and testing the changes to dev environment. Below are the challenges that I am facing at the moment:
 
1) Even though pac pcf push eliminates the need of incrementing the manifest version each time before deploying the control, I still have to delete the old control, save and publish the app and then open it again to add the updated control. Is this the expected behavior? Can we reduce the steps involved as it consumes a lot of time with a heavier app.
2) I want to move my existing unmanaged solution(containing the canvas app) as a managed solution to the test environment. What would be the best way to achieve this along with pcf control?
I tried moving both the solutions as managed solutions (existing solution and pcf solution using msbuild release command) to another environment but my canvas app did not show the pcf control in the new environment. Is there a way to add the pcf control in existing solution and move everything as managed solution to other environments?
  • SShivi Profile Picture
    49 on at
    Re: PCF - How to move the control to other enviroments?

    Hi @DianaBirkelbach 

     

    Incrementing the PCF version does the trick in case of Canvas App, I am getting the upgrade dialog now.

    Thanks for all your help! 

  • Verified answer
    Diana Birkelbach Profile Picture
    3,072 Most Valuable Professional on at
    Re: PCF - How to move the control to other enviroments?

    Hi @SShivi , 

     

    Happy to hear that the  blog helped. 
    Happy that I can tell that the "pac cli" got an udate, and the version "1.19.4" fixed also the "pac pcf push" issue.

     

    1. As far as I remember, for Canvas Apps and Custom Pages, the "pac pcf push" is not enough: you need to increment the PCF version too. The version is the trigger for the dialog where you get asked if you want to upgrade the component when you open a Canvas App/Custom Page.

    2.
    - If you deploy a PCF uploaded with "pac pcf push", you are right, you need to change the ".pcfproj" as stated in the docs: https://learn.microsoft.com/en-us/power-apps/developer/component-framework/debugging-custom-controls?WT.mc_id=BA-MVP-5004107#debugging-after-deploying-into-microsoft-dataverse

    - If you deployed using "msbuild" you need the "msbuild /p:configuration=Release". To get a unmanaged solution that way, you can make a change in the ".cdsproj", where you specify what type of solutions should be generater (manaed/unmanaged/both). I have a blog about all the possibilities in that case: https://dianabirkelbach.wordpress.com/2020/04/28/pcf-solution-packaging-unmanaged-production-release/


    You can choose the way you like better. Both ways work. It's not a problem if you deployed a solution generated with msbuild, and then switch to export-import from environment (maybe even change to pipelines). But of course, it's better to choose a strategy and stick with that, or to sync the solution with the version for msbuild, to avoid headaches. 

     

    Hope it helps!

     

  • SShivi Profile Picture
    49 on at
    Re: PCF - How to move the control to other enviroments?

    Hi @DianaBirkelbach,

     

    1) I am already following 'pac solution publish' command (thanks to you as I found your article while struggling with this issue). Though it reduces the overhead of deleting the whole solution and deploying it again, it did not solve the problem that I mentioned. I still have to delete the old control from canvas app, save and publish and re-open the app to add it again for the changes to reflect. Otherwise, I do not get any notification saying your control has been updated and it still refers the previous version.

    2) I followed the first approach mentioned by you and added the control in my existing main solution. The control was deployed using 'pac pcf push'. I then imported the solution as managed and deployed to test environment, everything is working fine. But can you elaborate a bit on part - "take care to upload a production version of the PCF before that". It seems I need to make a change in 'pcfproj' before adding the control to my main solution. But what if I deployed the control using msbuild unmanaged solution?

    Thanks for all your help.

  • Diana Birkelbach Profile Picture
    3,072 Most Valuable Professional on at
    Re: PCF - How to move the control to other enviroments?

    Hi @SShivi , 

     

    1) there is a bug with  "pac pcf psuh" (it doesn't publish the  customization). You can call a "pac solution publish" after that, and after you open the canvas app again, you should be asked about upgrading the component. I have a blog on this issue. the CLI team is working on a fix for the issue. https://dianabirkelbach.wordpress.com/2022/10/15/pac-pcf-push-not-updating-the-pcf-component/

    2) You have 2 ways:

     - include in your solution both the PCF and the canvas app, and export it as managed (take care to upload a production version of the PCF before that).

     - download the solution using "pac solution clone". That will create a CDS project locally. Then you can add your PCF to that solution usung "pac solution add-reference".

    Here are the docs aboout ALM with components. I hope it helps you furtherr: https://learn.microsoft.com/en-us/power-apps/developer/component-framework/code-components-alm?WT.mc_id=BA-MVP-5004107

     

     

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Apps - Power Apps Pro Dev & ISV

#1
WarrenBelz Profile Picture

WarrenBelz 85 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 59 Super User 2025 Season 1

#3
mmbr1606 Profile Picture

mmbr1606 55 Super User 2025 Season 1

Overall leaderboard