I have migrated the solution to .Net framework 4.7.2 on MSBuild 15 from .Net Framework 4.0 on MSBuild 10. The local compile time has not changed. I have then made the necessary changes (like changing the executable to MSBuild 15.7.180) with the following options;
Additionally I had integrated SonarQube and scanner in Bamboo (configure sonar in bamboo and SonarQube post processing fails with unknown reason) which now successfully generates the report using a bamboo command task. But this also resulted the bamboo build time see a ten fold increase in compile time (for those who know about SonarQube, I ran the MSBuild task between Sonar begin and end so that MsBuild is not run twice). Since it affected the compile time, I disable the Sonar tasks and the build plan is back to what it was before the Sonar integration. But this has not resolved the long time it takes to biuld. I would have thought that it would be somewhere close to the time it was taking before but the build time is still hovering around ten times more.
The build plan is as follows:
From the logs I can see that the MSBuild task which was taking a few minutes is now taking an hour and a half to complete. bamboo documentation and support does not help and the only relevant thread I am able to find is https://community.atlassian.com/t5/Bamboo-questions/Slow-make-compile-time-with-bamboo/qaq-p/408975
I understand there may be a number of possibilities why it slowed down and I am looking for ways which I may not be aware of and that I can try and help me with my investigation. any help is much appreciated.