web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Production PCF bundlin...
Power Apps
Unanswered

Production PCF bundling in unmanaged solution?

(0) ShareShare
ReportReport
Posted on by 3,072 Most Valuable Professional

We need to include a PCF component in a bigger suite. We don't want to have a dependency on the PCF solution, so I need to make an unmanaged Solution for my PCF, in order to make it possible to include it in the suite solution.

When I build the solution unmanaged using "msbuild" I get a zip size of 214KB.

The solution build  using "msbuild /p:configuration=Release" it's only 47KB, but I can use that only for managed solutions.

That can make a big difference in the performance.

Is there a way to generate an unmanaged solution with production bundling (without having to modify the generated zip manually)?

Best regards,

Diana

I have the same question (0)
  • Verified answer
    Rick Wilson Profile Picture
    160 on at

    @DianaBirkelbach ,

     

    Modifying the .cdsproj like below should output the managed and unmanaged zip files during the msbuild process.

     

    Create Both Solution TypesCreate Both Solution Types

     

    When i look at the files sizes in the bin\Release folder they are the same.

     

    -Rick

  • ScottDurow Profile Picture
    1,039 on at

    I always build using Release mode and output as an Unmanaged solution. This way you can import your component ready for export via either the same solution - or another larger solution that includes multiple components.

     

    The Development build is then used only for local debug. I don't see any reason to import your component to CDS as a development build.

  • Diana Birkelbach Profile Picture
    3,072 Most Valuable Professional on at

    Thank you Rick!

    I must admit that I couldn't understand the documentation right. I was also confused because the default cdsproj configuration delivers unmanaged for "msbuild", and managed for "msbuild /p:configuration=Release", both solutions having the same name (no "managed" in the name). 

    In case somebody else has the same problem, I've write a blog about this: https://dianabirkelbach.wordpress.com/2020/04/28/pcf-solution-packaging-unmanaged-for-production-release/

    Thanks again @RAWilson  and @ScottDurow  for your help.

    Best regards,

    Diana

  • BhuvitaSisodiya Profile Picture
    8 on at

    @ScottDurow @DianaBirkelbach 

    How do we debug our controls in development environment if we build the solution in release mode.

  • Bhuvita Sisodiya07 Profile Picture
    78 on at

    @ScottDurow @DianaBirkelbach 

    How do we debug our controls in development environment if we build the solution in release mode.

  • ScottDurow Profile Picture
    1,039 on at

    You can use Fiddler to redirect the loading of the bundle.js to your local version that is build using npm start watch!

     

    Hope this helps

  • Martype Profile Picture
    2 on at

    Ok, got it, the 'Both' option is pretty nice and gives as an optimized unmanged solution. But how to tell 'pac pcf push' what to deploy into the target system? How does it know whether to deploy a optimized/unoptimized output or manged/unmanaged solution?

  • Diana Birkelbach Profile Picture
    3,072 Most Valuable Professional on at

    Hi  @Martype , 

     

    "pac pcf push" is supposed to be used only during development, so it uploads the debug version. That is called while you are in the "PCF-Project" folder.

     

    When the development is done, you should use the "Solution Project" and call "msbuild" (with or without /p:configuration=Release). This will generate a Solution zip, which you can deploy like any other Solution import.

     

    Hope it helps!

    Kind regards,

    Diana

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 796 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard