Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

is there an easy way to log the amount of time visual studio 2010 spends building?

We would like to automatically log the time we spend building our project every day, while devving. Builds can be initiated by pressing f5, or runnning our n-unit tests with TestDriven.Net. We want the entire combined time of building, not just for one or 2 projects. We want to do this to compare the impact on productivity of a slow pc versus a fast pc. Any ideas?

Update: I've investigated MSBuild loggers. This seems like it could work, but I can't figure out how to send parameters to MSBuild when we do an f5 build from VS.

like image 837
Hannes Nel Avatar asked Mar 16 '11 21:03

Hannes Nel


2 Answers

VSCommands for Visual Studio 2010 and 2012 is available from Visual Studio Gallery can produce detailed build statistics in output window after the build is finished:

enter image description here

like image 178
Jarek Kardas Avatar answered Sep 30 '22 15:09

Jarek Kardas


Tools + Options, Projects and Solutions, Build and Run. Change the MSBuild project build output verbosity setting to Normal. You'll get a Time Elapsed measurement at the end of the build. You can turn this setting to 11 to get a detailed breakdown. Build log output is automatically saved to the buildlog.htm file in the project's build directory.

The equivalent command line option is /verbosity:normal (/v:n). You can get output logged to a file with redirection or the /fileLogger option (/fl). Type msbuild /? to get a summary of these options, there are a bunch more obscure ways to log.

like image 28
Hans Passant Avatar answered Sep 30 '22 13:09

Hans Passant