Skip to main content

Notifications

Community site session details

Community site session details

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

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

  • Diana Birkelbach Profile Picture
    3,072 Most Valuable Professional on at
    Re: Production PCF bundling in unmanaged solution?

    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

  • Martype Profile Picture
    2 on at
    Re: Production PCF bundling in unmanaged solution?

    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?

  • ScottDurow Profile Picture
    1,039 on at
    Re: Production PCF bundling in unmanaged solution?

    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

  • Bhuvita Sisodiya07 Profile Picture
    78 on at
    Re: Production PCF bundling in unmanaged solution?

    @ScottDurow @DianaBirkelbach 

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

  • BhuvitaSisodiya Profile Picture
    8 on at
    Re: Production PCF bundling in unmanaged solution?

    @ScottDurow @DianaBirkelbach 

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

  • Diana Birkelbach Profile Picture
    3,072 Most Valuable Professional on at
    Re: Production PCF bundling in unmanaged solution?

    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

  • ScottDurow Profile Picture
    1,039 on at
    Re: Production PCF bundling in unmanaged solution?

    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.

  • Verified answer
    Rick Wilson Profile Picture
    160 on at
    Re: Production PCF bundling in unmanaged solution?

    @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

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

Michael Gernaey – Community Spotlight

We are honored to recognize Michael Gernaey as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard >