48

Does any know if there is any native mechanism to report on the total solution build time in Visual Studio 2008? You can change the build verbosity to report build times per project as discussed here or report total build time from msbuild but I’d like to see this in the IDE across an entire solution containing many projects. Short of creating custom pre and post build events, does anyone know if there’s any native output for total build time? Thanks!

Community
  • 1
  • 1
Troy Hunt
  • 20,345
  • 13
  • 96
  • 151
  • Hey Troy, maybe it's not relevant any more, but I tried the VS extension BuildMonitor, and it seems to work nicely: https://marketplace.visualstudio.com/items?itemName=danielperssson.BuildMonitor – Mark Vincze Feb 06 '17 at 10:12

6 Answers6

24

For the sake of completeness, the correct answer is "No, you can't report on total solution build time directly within Visual Studio".

Troy Hunt
  • 20,345
  • 13
  • 96
  • 151
  • Correct answer is yes. See splintor answer bellow. – Aleksey Cherenkov Mar 22 '13 at 15:45
  • 5
    Correct answer is no - the question was for Visual Studio 2008 and I don't think splintor bellowed at all, he was actually rather polite :) – Troy Hunt Mar 23 '13 at 07:36
  • 1
    Still correct as of VS 2015 :( – Jon Dec 17 '15 at 01:21
  • [Have you tried this solution?](http://stackoverflow.com/questions/523220/awesome-visual-studio-macros/2112181#2112181) It works well in VS2010, and I think it should work in older versions as well (not in newer though because it's a VB macro). – Andreas Haferburg May 10 '16 at 12:33
17

Not native and not not for VS 2008 (currently only for VS 2010), but the VSCommands 2010 extension provides these statistics.

See also: VS 2010: Prevent display of Build Summary in the output window

Community
  • 1
  • 1
splintor
  • 9,924
  • 6
  • 74
  • 89
12

MSBuild will show the total build time when you run it from the command prompt, e.g:

> msbuild MySolution.sln
...
Time Elapsed 00:00:36.94
GraemeF
  • 11,327
  • 5
  • 52
  • 76
  • 4
    Sure, I’m aware of the command line option, I’m looking for something within VS though so it is visible during normal development. – Troy Hunt Oct 29 '09 at 03:34
9

There's also an easy way to measure the build time per project in Visual Studio 2010. I'm pretty sure it will work in Visual Studio 2008, too. All you have to do is to go to Tools -> Options -> Projects and Solutions -> Build and Run and set the MSBuild project build output verbosity to "Normal" or "Detailed" (I recommend "Normal", as detailed gives too much information).

Pavel Vladov
  • 4,707
  • 3
  • 35
  • 39
  • 4
    "Normal" does not output the total build time if you have more than a single project inside your solution. Neither does "Detailed". – Vinz Jan 01 '19 at 03:04
3

I think you could probably hook into the OnBuildBegin and OnBuildDone events

http://visualstudiohacks.com/general/customize-your-project-build-process/

mcintyre321
  • 12,996
  • 8
  • 66
  • 103
  • Thanks, that's an interesting avenue to follow. – Troy Hunt Aug 25 '10 at 10:21
  • 1
    Yes, meanwhile this was answered somewhere else, have a look at this macro: http://stackoverflow.com/questions/523220/awesome-visual-studio-macros/2112181#2112181 – Hace Jun 01 '11 at 08:24
1

In VC++2008, there is the "Build Timing' option in Tools / Options / Projects and solutions / VC++ Project Settings

alocaly
  • 697
  • 6
  • 7