Question

I created some msbuild scripts that build my projects using msbuild task. I pass as parameters the list of projects to build (not the solution file).

In VS2010, building the solution the second time without modifying any files will finish almost at the same time since it detect that nothing was changed.

Executing the msbuild scripts the second/third/forth time will take the same time.

Any ideas how to make the msbuild to behave the same as vs2010?

Thanks, Eran.

Was it helpful?

Solution

Many MSBuild tasks shipped by Microsoft, uses IncrementallBuild or Filetracker in order to track which files were used to produce outputs of given file. Knowing relation between inputs and outputs MSBuild can create dependency graph.

By comparing timestamp of output file and all input files can eliminate execution on many tasks. If timestamps of all input files for given output file are "lower/before" than output file, it means none input file were modified, MSBuild can skip execution of this task.

I case of VC++ project this information is logged into *.tlog files (stored in IntermediateDirectory $(IntDir) of project). By execution of target Rebuild you can skip using IncrementalBuild feature it because rebeuild means clean and build (so tlog files are deleted).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top