Reputation: 2484
We have a long-running msbuild script that I'm trying to speed up. Is there a way to get msbuild to log the time spent in each target?
I've had a look at the xml logger, but it just outputs the total time.
Would I have to make my own logger, or is there something built in?
Upvotes: 4
Views: 2471
Reputation: 310907
If you capture a .binlog
during build (via msbuild -bl
), you can use the excellent MSBuild Structured Log Viewer to gain deep insights into what actually happened during the build, and where all the time was spent.
Upvotes: 0
Reputation: 9695
There's also useful msbuild argument when you want to analyze which particular project in the solution is taken long time:
https://msdn.microsoft.com/en-us/library/ms164311.aspx
/detailedsummary /ds Show detailed information at the end of the build log about the configurations that were built and how they were scheduled to nodes.
Fantastic explanation about format is given here: https://blogs.msdn.microsoft.com/visualstudio/2010/03/05/msbuild-4-detailed-build-summary/
Upvotes: 1
Reputation: 2484
Its actually quite easy, in the command line, just add this:
/consoleloggerparameters:PerformanceSummary
Upvotes: 12