Jefe
Jefe

Reputation: 177

MSBuild VistualStudio 2012- How to log to a file how long it took to build

I'm looking into logging to a file how long it takes to build a solution in VS2012. This solution contains 70-80 vcxproj and I'm interested in how long it took to build the solution, or how long it took to build an individual project, by right-clicking on a project in solution explorer and choosing either Build or ProjectOnly->Build.

Thanks,

Upvotes: 0

Views: 90

Answers (1)

Palo Misik
Palo Misik

Reputation: 761

  1. Enable Build timing in Tools > Options > Projects and Solutions > VC++ Project Settings > Build Timing It actually starts msbuild with PerformanceSummary flag
  2. If you are interested in elapsed time of the whole build
    • Change Tools > Options > Build and Run > MSBuild project build output verbosity at least to Normal. (in this case it is logged just to output window)
    • I you wish to have it stored into build log file change also Change Tools > Options > Build and Run > MSBuild project build log file verbosity at least to Normal.

Build of each vcxproj file is logged into file specified in Project > Properties >Configuration Properties >Build Log File

If you don’t see any time after hitting the build command, it can be because your project is up to date (nothing was changed) – detected by the incremental build feature of the msbuild.

Upvotes: 2

Related Questions