views:

121

answers:

3

It seems like it should be possible to configure Visual Studio to print out how long the compile takes.

Perhaps somewhere in the .sln file. If the sln is compiled from the command line using msbuild, it prints the time.

+1  A: 

Adjust the MSBuild output level.

leppie
+5  A: 

Tools > Options > Projects and Solutions > Build and Run > MSBuild project build output verbosity

Edit: On VS2008, this gives you the information on a project by project basis. I did not find a way to get the information for the whole solution build.

Marcel Gosselin
A: 
  1. Right click on the Solution in the Solution Explorer and pick "Project Build Order"
  2. Note which is the first project to be built and the last one to be built.
  3. In the first project go to the Pre-build event command line and enter: "ver | time"
  4. In the last project go to the Post-build event command line and enter: "ver | time"

You will see in the "Output" window the beginning time and the end time. Do the math!

Exercise for the reader: Pipe the output of the two commands to a file and subtract them and output it to the output window.

Kevin Driedger