Show build time in Visual Studio Output Window

The output window in Visual Studio shows lots of useful information; but it doesn't link it to the time.
Sharepoint deployments take ages and I’m quite often distracted and forget whether I have triggered the deploy or not.

I want to quickly check the output window and see when I last triggered the deploy. I found 2 solutions:

1) Add a pre-build (pre-deployment) step.

Open project properties and add the following command:

    ECHO ------ %TIME% ------

clip_image001

Now the output window displays:

clip_image002

2) Increase the MSBuild diagnostic level in options

By default Visual Studio shows ‘Minimal’ diagnostic information when compiling a project. Increasing this level will show more details (including timestamps at start, end and elapsed build time)

  • Click tools –> options
  • Under Projects and Solution –> Build and Run
  • Change the output verbosity to ‘Normal’;

image