cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
DianaBirkelbach
Level: Powered On

PCF Solution generation verry slow

To create the solution containing the PCF component, we need to create the solution project and add the component to the solution. Then we need to call "msbuild /t:restore" and then "msbuild". No problem until here.

Later on, when I want to create a new version of the component, I increment the version in the manifest, and the I need to call the "msbuild" command again, right?

 

My problem is: calling the msbuild takes about "3:11" Minutes every time. The bundling of the js file is fast, but then it takes 3 minutes where I see no update on the screen.

I take a coffee, I come back, and it's still generating. Cat Frustrated  

 

 I wonder if I am the only one with this problem. Maybe the VS2019 installed on my computer could cause some issues? Or I just need a new laptop Cat Wink 

 

Is there a way to speed up  the generation of the solution update? Is it ok to modify the content of the solution.zip just replacing the js webresource? Or maybe there is another way?

 

Best regards,

Diana

7 REPLIES 7
devendramsft
Level: Powered On

Re: PCF Solution generation verry slow

Msbuild /t:restore is needed 1 time when you create the pcf or solution project. After that you should only do Msbuild (without /t:restore), to do build. After modifying the version in pcf, you need to run msbuild on solution project, so that it builds the package via project references. It should not take more than couple of seconds to build this. It's not recommended to modify the packaged zip.
You can try few things.
a) record the time for msbuild /t:restore multiple times
b) record the time for msbuild multiple times & see if it's consistently 3 minutes.
c) try to limit the number of nuget sources that you have in your NuGet.config on your machines.
c) try it on a different machine if this doesn't resolve on restart of machine if there are pending updates.
PowerApps Staff Craig-MSFT
PowerApps Staff

Re: PCF Solution generation verry slow

To Devendra's third point, can you please run 'nuget source list' on a command-line (where nuget is in the path) and let us know how many sources you have registered on that machine?

 

You can also try running 'msbuild /t:build /verbosity:diag' to see if you can tell where the time is being spent. If you are ok sending us these logs, that would be helpful as well.

DianaBirkelbach
Level: Powered On

Re: PCF Solution generation verry slow

Thanks a lot. Yes, it's about msbuild (without restore), and it takes always more than 3 minutes. Good point about the nuget.config. Thanks 

DianaBirkelbach
Level: Powered On

Re: PCF Solution generation verry slow

Thanks a lot. Smiley Happy

Today I'm using it for the first time in HomeOffice, and it turns out that the problem occurs only when I'm in the office.

I actually have another nuget feed configured (company internal). I'll investigate the issue (using the "verbosity") next week when I'm in the office again, since in homeoffice the msbuild takes only 12 seconds (yay) 🙂 

Best regards,

Diana

 

DianaBirkelbach
Level: Powered On

Re: PCF Solution generation verry slow

@Craig-MSFT  Hi, I have the following packages:

1. "nuget.org":   https://api.nuget.org/v3/index.json,

3. an company internal feed, and

3. "Microsoft Visual Studio Offline Packages"  

I've tried to delete the company internal feed, but it is takes still more than 3 minutes when I'm in the office.

If I try to stop the msbuild task, it seems to be executing the "Exec" task, showing me (sorry for the german words, but you'll get the idea) 

<..>.nuget\packages\microsoft.powerapps.msbuild.pcf\0.2.59\build\Microsoft.PowerApps.MSBuild.Pcf.targets(22
,3): warning MSB4220: Warten auf Abbruch der aktuell ausgeführten Aufgabe "Exec".

Executing the msbuild using the /verbosity:diag I get the conclusion:

Leistungszusammenfassung fr das Ziel:
        0 ms _GetProjectJsonPath                        2 Aufrufe
        0 ms CollectPackageReferences                   2 Aufrufe
        1 ms EnableIntermediateOutputPathMismatchWarning   2 Aufrufe
        1 ms _GetRestoreProjectStyle                    2 Aufrufe
       19 ms MutateCdsSolutionAssets                    1 Aufrufe
       19 ms _CheckForInvalidConfigurationAndPlatform   2 Aufrufe
       23 ms CopyCdsSolutionContent                     1 Aufrufe
    189826 ms Build                                      2 Aufrufe
    190748 ms CdsResolveReferences                       1 Aufrufe

Leistungszusammenfassung fr die Aufgabe:
        2 ms Message                                    9 Aufrufe
       15 ms MutateCdsSolutionAssets                    1 Aufrufe
       34 ms Copy                                       2 Aufrufe
    189824 ms Exec                                       2 Aufrufe
    190714 ms MSBuild                                    1 Aufrufe

Der Buildvorgang wurde erfolgreich ausgefhrt.
    0 Warnung(en)
    0 Fehler

Verstrichene Zeit 00:03:11.45

Do you have any idea where I can look for the problem? I've tried setting all kinds of proxy settings, but I have no luck.

bthompson
Level: Powered On

Re: PCF Solution generation verry slow

Years ago on Java projects (so an awful lot of small files) I used to have a problem with the corporate anti-virus kicking in everytime the compiler loaded a file - it resulted in compile times of hours rather than a minute. Could that be the issue?

DianaBirkelbach
Level: Powered On

Re: PCF Solution generation verry slow

It could be the antivirus, but then I don't understand why it works fast when I'm home. I use the same machine.

I've also tried all kinds of proxy settings, but nothing helped. Woman Frustrated

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors
Users Online
Currently online: 88 members 4,880 guests
Please welcome our newest community members: